in reply to Re: Not a HASH reference
in thread Not a HASH reference

So when I check for an array in line 69 like this:

if (ref($xml->{SD}{AMZN}{PRODUCT}) eq "ARRAY")

it should return TRUE, but I keep getting a "NOT HASH reference" error at this line! Frank

Replies are listed 'Best First'.
Re^3: Not a HASH reference
by tobyink (Canon) on Jul 10, 2019 at 00:01 UTC

    $xml->{SD} is an arrayref, so $xml->{SD}{AMZN} is not a thing.

    I strongly advise switching to a saner XML module. XML::LibXML is my favourite.