in reply to accessing data inside HASH(0x225b94)
getAgent returns a hash reference but you are assigning it to a hash. If you had warnings enabled you would have got a message about an odd number of elements.
my $hash_ref = $ie->getAgent(); foreach my $key ( %{$hash_ref} ) { printf "at %s we have %s\n", $key, $hash_ref->{$key}; }
Update: changed $hash to $hash_ref
Update 2: Sorry, please disregard this answer. My response time has been so slow tonight that I got impatient and didn't see the %{} the OP had put in. My apologies and thanks to my unknown benefactor.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: accessing data inside HASH(0x225b94)
by Anonymous Monk on Feb 12, 2008 at 11:24 UTC | |
by Kashratul (Acolyte) on Feb 13, 2008 at 04:11 UTC |