my $freqocurrence={}; my $observation={}; my $total10=0; sub freq_oc{ foreach my $key (%$observation){ $total10 += $observation->{$key}; } foreach my $key (%$observation){ $freqocurrence->{$key} = $observation->{$key}/$total10; print "Frequency of ocurrence:Aminoacid $key-> $freqocurrence->{$k +ey}\n"; } print Dumper $observation; print Dumper $freqocurrence; }
In reply to Problem in a Loop by madM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |