Skip to content

Instantly share code, notes, and snippets.

@iMilnb
Created June 4, 2014 16:33
Show Gist options
  • Save iMilnb/05464b63c12697dbb2e4 to your computer and use it in GitHub Desktop.
Save iMilnb/05464b63c12697dbb2e4 to your computer and use it in GitHub Desktop.
use Storable qw(retrieve);
use JSON;
my $h;
my $json;
my @jarr;
@files = <$ARGV[0]>;
foreach $file (@files) {
$h = retrieve($file);
$json = encode_json \%$h;
push(@jarr, $json)
}
print '[' . join(',', @jarr) . ']';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment