os-autoinst-distri-fedora/perl2json

11 lines
203 B
Perl
Executable File

#!/bin/perl
use JSON;
my $infile = shift @ARGV;
my $outfile = shift @ARGV;
my $info = do $infile;
$info = JSON->new->relaxed->pretty->encode($info);
open(my $outfh, '>', $outfile);
print $outfh $info;