If I do the following, it works fine:
print $ref->{element}->[0]->{data};
I would like to see how many references are in the array so that I can loop through them, but I am having a hard time doing that.
Here is the code I have tried, but it doesn't work:
my @array = @$ref->{element};
foreach(@array) {
print $_->{data};
}
I get an "Not an ARRAY reference" error