Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Hashes, Arrays, and Confusion -- In a bit over my head!

by tangent (Deacon)
on Mar 30, 2012 at 01:38 UTC ( #962512=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Hashes, Arrays, and Confusion -- In a bit over my head!
in thread Hashes, Arrays, and Confusion -- In a bit over my head!

This does not print out any results for key or errors (lines 211 and 212)
Riales used this to get the $key:
$key =~ /^LOGGED IN (\w+) GET/; $key = $1;
Whereas you are using this:
$key =~ s/LOGGED IN //; $key =~ s/ GET //; $key =~ s/ POST //; $key = $1;
In your version you need to leave out the last line: $key = $1
How do I grab all of the col1_vals together in order to run an average
Riales code
my $calcd = calculate_stuff($seen{$key}->{col1_vals});
covers this. All of the col1_vals are now in $seen{$key}->{col1_vals} which is an array reference - if you print that out you will see:
foreach my $key (keys %seen) { my $col1_vals = $seen{$key}->{col1_vals}; print "@$col1_vals\n"; }


Comment on Re^4: Hashes, Arrays, and Confusion -- In a bit over my head!
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-07-11 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls