use warnings; use strict; use HTTP::Request::Common qw(GET); use JSON::XS; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $endpoint = 'http://blah'; my $req = HTTP::Request->new('GET'); $req->url($endpoint); my $resp = $ua->request($req); my $json = $resp->content; my $perl = decode_json $json; # it's an array of hashes of hashes (AoHoH). We need to # access it like this: for my $href (@$perl){ # grabbed each hash reference from the top-level array # ...now, print the vendor's name print "vendor: $href->{Header}{VendorName}\n"; for my $item (@{ $href->{Items} }){ # each top level href has a Header href, and many # Item hrefs inside of an array ref. Here, we're # looping over each Item, and doing something print "\track num: $item->{RackNumber}\n"; } }