madM has asked for the wisdom of the Perl Monks concerning the following question:
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem in a Loop
by hdb (Monsignor) on Sep 19, 2013 at 13:01 UTC | |
by madM (Beadle) on Sep 19, 2013 at 13:22 UTC | |
by hdb (Monsignor) on Sep 19, 2013 at 13:28 UTC | |
by madM (Beadle) on Sep 19, 2013 at 13:12 UTC | |
|
Re: Problem in a Loop
by derby (Abbot) on Sep 19, 2013 at 13:25 UTC |