#!/usr/bin/perl use strict; use warnings; use JSON::XS; open(IN,"example.json") or die $!; $/ = undef; $_ = ; my $j = decode_json($_); print "ok\n"; print "keys are: ".join("\n",keys(%$j))."\n";