and I get a 'Not an ARRAY reference' error. What am I doing wrong?
Well, I get a Not a HASH reference error, since $getToysResults->{Toys}->{Toy} is of type ARRAY:
$VAR1 = { 'Toys' => bless( { 'Toy' => [ <----- here ... ] }, 'ArrayOfToy' ) };
You need two loops.
for my $toy ( @{$getToysResults->{Toys}->{Toy}} ) { for my $l ( @{$toy->{ToyLocations}->{ToyLocation}} ) { print "$l->{locationName}\n" } }
In reply to Re: Parsing SOAP::Lite results
by shmem
in thread Parsing SOAP::Lite results
by Roboz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |