NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
JSON::XS makes it easy (Score:2)
$ perl -MJSON::XS -MFile::Slurp -e '$g=read_file("add.gif"); print JSON::XS->new->ascii(1)->encode({file=>$g})' > json
$ perl -MJSON::XS -MFile::Slurp -e '$g=read_file("json"); $d = decode_json($g); print $d->{file}' > gif
$ diff add.gif gif
$
-- ask bjoern hansen [askbjoernhansen.com], !try; do();
Reply to This
Re: (Score:2)
Re: (Score:2)
-- ask bjoern hansen [askbjoernhansen.com], !try; do();