Word of advice, pick "for" or "foreach" and use one. Minor nit, but they're interchangable, and switching back and forth tends to make it less readable for me.
And just a quick note:
can be written more perlish as (assuming you really want elements 0 .. $#aas of @aas, instead of 1..$#aas+1):for( my $i=1; $i<@aas; $i++){ #etc }
for( @aas ){ @codons = @{$Deg_codons{$_}}; for my $seq( keys %SEQ ){ for my $codon( @codons ){ $SEQ{$seq.$codon}=1; } delete $SEQ{$seq}; } }
There are probably some other changes that could be made here, but these are just the ones that jump off the page at me.
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
In reply to Re: foreach to for
by chargrill
in thread foreach to for
by tricolaire
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |