http://www.perlmonks.org?node_id=962512


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"; }