$ $ ./1.js.pl {"baz":function () { /* some JS here? */ },"foo":["bar","quz"]} $ ./1.json.pl 'false' expected, at character offset 7 (before "function () { /* som...") at ./1.json.pl line 7, line 1. $ cat 1.json.pl #!/usr/bin/perl -w use 5.011; use Data::Dumper; use JSON; my $json = ; my $perl = decode_json $json; print Dumper $perl; __DATA__ {"baz":function () { /* some JS here? */ },"foo":["bar","quz"]} $