Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Problem in a Loop

by madM (Beadle)
on Sep 19, 2013 at 13:22 UTC ( [id://1054850]=note: print w/replies, xml ) Need Help??


in reply to Re: Problem in a Loop
in thread Problem in a Loop

now it works but i have another question .. do you know why when i print data Dumper i donīt get anything?
my $freqocurrence={}; sub freq_oc{ foreach my $key (keys %$observation){ $total10 += $observation->{$key}; } foreach my $key (keys %$observation){ $freqocurrence->{$key} = $observation->{$key}/$total10; print "Frequency of ocurrence: Aminoacid $key-> $freqocurrence +->{$key}\n"; } } print Dumper $freqocurrence;

Replies are listed 'Best First'.
Re^3: Problem in a Loop
by hdb (Monsignor) on Sep 19, 2013 at 13:28 UTC

    I can only guess that your script misses the following three lines near the top:

    use strict; use warnings; use Data::Dumper;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1054850]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 03:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found