Use JSON or JSON :: XS to decode JSON in a Perl structure.
A simple example:
use strict; use warnings; use JSON::XS; my $json = '[{"Year":"2012","Quarter":"Q3","DataType":"Other 3","Environment":"STEVE","Amount":125},{"Year":"2012","Quarter":"Q4","DataType":"Other 2","Environment":"MIKE","Amount":500}]'; my $arrayref = decode_json $json; foreach my $item( @$arrayref ) {
source share