in reply to XML Parser issue
You are pushing multiple references to the same hash. You need to create a new hash for each page. A small change that does that is to change
if($data =~ /^page$/) { push(@pagesArray,\%hash); }
to:
if($data =~ /^page$/) { push @pagesArray, {%hash}; %hash = (); }
which simply creates a copy of the hash.
|
|---|