[SP-pm] Problema com encoding

Fernando Oliveira fernandocorrea em gmail.com
Sexta Julho 13 09:22:12 PDT 2007


pq não?

<code>
while(<>) {$var =~ s/$key/$dictionary{$_}/g for keys%dictionary;print$var}
</code>

Em 13/07/07, Eden Cardim <edencardim em gmail.com> escreveu:
>
> On 7/13/07, Solli Honorio <shonorio em gmail.com> wrote:
> >     my $bytes_read = read( INPUT, $var ,$length );
> >
> >
> >     while ( $bytes_read > 0 ) {
> >         foreach my $key ( keys (%dictionary) ) {
> >              $var =~ s/$key/$dictionary{$key}/g;
> >         }
> >
> >         print OUTPUT $var;
> >         $bytes_read = read(INPUT, $var, $length);
> >      }
>
> essa parte pode ser simplificada para:
>
> while( read INPUT, $var, $length ) {
>
>          foreach my $key ( keys (%dictionary) ) {
>               $var =~ s/$key/$dictionary{$key}/g;
>          }
>
>          print OUTPUT $var;
> }
>
> Golfe alguém? ;)
>
> --
> Eden Cardim
> Instituto Baiano de Biotecnologia
> Núcleo de Biologia Computacional e Gestão de Informações Biotecnológicas
> Laboratório de Bioinformática
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>



-- 
[]'s Fernando
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://mail.pm.org/pipermail/saopaulo-pm/attachments/20070713/5a2efe8c/attachment.html 


Mais detalhes sobre a lista de discussão SaoPaulo-pm