Wednesday, September 28, 2005

perl special variables ..ARGV

just had a reason to use $ARGV in a perl one liner


ARGV The special filehandle that iterates over command-line file-filenames
names in @ARGV. Usually written as the null filehandle in the
angle operator "<>". Note that currently "ARGV" only has its
magical effect within the "<>" operator; elsewhere it is just a
plain filehandle corresponding to the last file opened by "<>".
In particular, passing "\*ARGV" as a parameter to a function
that expects a filehandle may not cause your function to
automatically read the contents of all the files in @ARGV.


more perl special variables can be found in the perlvar manpage