#!/usr/bin/perl use strict; use warnings; use JSON; die "Usage: $0 " if @ARGV != 1; open my $h, '<', $ARGV[0] or die "Can't open file '$ARGV[0]' for reading: $!"; my $contents = do { local $/; <$h> }; close $h or warn $!; my $res = from_json($contents); # vim: ft=perl