in reply to How do I iterate through this data set?
print ref $hash->{'searchResult'}->{'item'};
will tell you that what you have is an array reference, not a hash.
To get at the array elements for the loop, use
foreach my $n (@{ $hash->{'searchResult'}->{'item'} }) { ... }
Also see References Quick Reference.
|
|---|