datannen has asked for the wisdom of the Perl Monks concerning the following question:
I could really use your help. I am using a funky line in my code to store bad rows of log data:
push @{%Bad_Host_Rows->{dirname($row[1])}->{$row[0]}}, [@row];
When I make simple tests with this line, it works perfectly. However, when actually running it in my code I'm getting multiple $VAR1 values in Dumper for the same hashes.row 0 = IP row 1 = path row 2 = date
Example:
Why are my rows not being pushed into the same hash, but sometimes creating copies of themselves?$VAR1 = {'/testdir/1000/200' => { '12.123.12.12' => [ ['12.123.12.12', + '/testdir/1000/200/index.php', '2004-05-25 00:33:30'], ['12.123.12.12', '/testdir/1000/200/index.php', '2004-05-25 00:33:31'] +] }}; $VAR1 = {'/testdir/1000/200' => { '12.123.12.12' => [ ['12.123.12.12', + '/testdir/1000/200/index.php', '2004-05-25 00:33:34'], ['12.123.12.12', '/testdir/1000/200/index.php', '2004-05-25 00:33:34'] +]}};
Thanks for your help.
edit (broquaint): tidied up formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: crazy hashes
by Aragorn (Curate) on May 25, 2004 at 09:13 UTC | |
by datannen (Novice) on May 25, 2004 at 14:09 UTC | |
by Aragorn (Curate) on May 25, 2004 at 14:22 UTC | |
by datannen (Novice) on May 26, 2004 at 21:29 UTC | |
by Aragorn (Curate) on May 27, 2004 at 08:07 UTC | |
|
Re: crazy hashes
by saberworks (Curate) on May 25, 2004 at 09:09 UTC |