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
    Thanks All! I thought I'd tried that but I'm thinking I must have tried it with the parent key, and so it complained that it wasn't an Array. Actually, now that I think about it, I'm positive that's what I did. Cool...thanks!