SPUG: running script with the variables on the same line

Tim Maher tim at consultix-inc.com
Mon May 30 09:07:05 PDT 2005


On Sun, May 29, 2005 at 08:31:00PM -0700, John W. Krahn wrote:
> Tim Maher wrote:
> > 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".
> 
> Perl is case sensitive so the variable you are looking for is $ARGV.
> perldoc perlvar

Quite right; and it's interesting how my perceptual systems did
automatic error-correction on 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"   |
|  See http://manning.com/Maher for details, and email notification signup |
*--------------------------------------------------------------------------*


More information about the spug-list mailing list