in reply to Re: Adding data to hashes & comparing
in thread Adding data to hashes & comparing

Thanks for the tips. I believe I am close, but not there yet. This section of code doesn't seem to be operating as I expect?
if (%data) { # We have data to process while( my ($key, $value) = each(%data) ) { if($key =~ '%{User-Agent}i\""') { $userAgent = $value; } if($key =~ '%t') { $date = $value; } } $aRequests = $hRequests{$date}{$userAgent}; push @$aRequests, \%data; }


I am using eclipse and even though I breakpoint and see the hash keys %{User-Agent}i\"" & %t, those if statements are never satisfied. It loops through the entire hash, but the $key never changes from %{Referer}i.

What am I doing wrong?

Replies are listed 'Best First'.
Re^3: Adding data to hashes & comparing
by pileofrogs (Priest) on Apr 02, 2009 at 16:32 UTC

    Are you sure it's not that the pattern doesn't match?