in reply to Looping through an array

The contents of $DATA in not Perl, it looks like a JSON. There are modules to turn JSON into a Perl structure (e.g. Cpanel::JSON::XS).

Your code doesn't compile under strict. That's because $doc_data is declared only in the for loop, but you use it outside of it in the else part. Without strict, it runs, but doesn't output anything.

Please, try to post the actual code. Help us to help you.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]