in reply to Issue with POP in array ref.

That doesn't appear to be the proper data (its not a hash reference, it's an array of arrays). To further, there are missing double-quotes within it.

Please show us a chunk of the real data that you're using, or the output of use Data::Dumper; print Dumper $data;.