#! perl use strict; use warnings; use JSON; my @fields = qw(eTime lTime eCompressd eUnCompressd iCompressd iUnCompressd); my $j = JSON->new; { local $/ = '}'; while (my $jsonstr = ) { my $structure = $j->decode($jsonstr); print "\n========== RECORD ===========\n\n"; printf("%-12s = %s\n", $_, $structure->{$_}) for @fields; } } __DATA__