If I do the following, it works fine:
print $ref->{element}->[0]->{data};
I would like to see how many links are in the array so that I can iterate over them, but it's hard for me to do this.
Here is the code I tried but it does not work:
my @array = @$ref->{element}; foreach(@array) { print $_->{data}; }
I get the error message "Not ARRAY reference"
source share