in reply to Trouble dereferencing an array of hashes
You are very close, and kudos for recognizing the hash of arrays (or more precisely, a hash of a hash of a hash of an array of hash references).
foreach iterates over a list, not a reference (see perlsyn). In this case, you need to dereference the array before foreach can use it.
foreach my $response ( @{ $content->{Addresses}{ArrayOfAddressResponse +}{AddressResponse} } ) { # do something with $response, which is a hash ref
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trouble dereferencing an array of hashes
by rastoboy (Monk) on Nov 05, 2009 at 07:57 UTC |