NAME

ARGV::URL - Wrap URLs from @ARGV for fetching and content consumption with <>

SYNOPSIS

From one-liners:

perl -MARGV::URL -E "... <> ... "  $file_or_url ...
perl -MARGV::URL -nE "..." $file_or_uri ...
perl -MARGV::URL -pE "..." $file_or_url ...

From a script:

use ARG::URL;
...
while (<>) {
   ...

From a script that takes command-line options that should not be processed by ARGV::URL :

# Skipping import
use ARGV::URL ();

... extract options from @ARGV ...

# Prepare URLs: do import now
ARGV::URL->import;

DESCRIPTION

This module adds some power to the diamond (<>) operator (see perlopentut): importing the module will transform URLs in @ARGV so that their content is fetched and fed to <> like what is done for filenames in the standard behavior.

IMPLEMENTATION DETAILS

Note: implementation details are specific to this release and may change in a later release.

Have a look at the code: this is a 3-lines module.

Fetching URLs is done using the following command:

lwp-request -m GET "$url"

SEE ALSO

AUTHOR

Olivier Mengué, mailto:dolmen@cpan.org.

COPYRIGHT & LICENSE

Copyright © 2011 Olivier Mengué.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.