SPUG: running script with the variables on the same line
Tim Maher
tim at consultix-inc.com
Sun May 29 19:44:32 PDT 2005
On Sun, May 29, 2005 at 07:31:04PM -0700, Jay Scherrer wrote:
> I was thinking of $argv, but is that only used for files?
> Jay Scherrer
Yes; That variable provides the name of the currently open file
when you use -n/-p to get an "implicit input-reading loop".
He could of course have used @ARGV to grab the arguments
and set the variables on his own, but life's too short for that! 8-}
-Tim
*--------------------------------------------------------------------------*
| Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX |
| tim(AT)Consultix-Inc.Com http://TeachMePerl.Com http://TeachMeUnix.Com |
*+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
| Watch for my Summer, 2005 book: "Minimal Perl for UNIX/Linux People" |
*--------------------------------------------------------------------------*
More information about the spug-list
mailing list