ARGV::JSON - Parses @ARGV for accessing JSON via <>
<>
use ARGV::JSON; while (<>) { # $_ is a decoded JSON here! }
Or in one-liner:
perl -MARGV::JSON -anal -E 'say $_->{foo}->{bar}' a.json b.json
ARGV::JSON parses each input from @ARGV and enables to access the JSON data structures via <>.
@ARGV
Each readline call to <> (or <ARGV>) returns a hashref or arrayref or something that the input serializes in the JSON format.
readline
<ARGV>
ARGV::URL.
Copyright (C) motemen.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
motemen <motemen@gmail.com>
To install ARGV::JSON, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ARGV::JSON
CPAN shell
perl -MCPAN -e shell install ARGV::JSON
For more information on module installation, please visit the detailed CPAN module installation guide.