APM: Command line arguments

Jeremy Brooks jeremy.brooks at univista.com
Wed Feb 18 09:09:38 CST 2004


All command line args are stored in @ARGV in the order you supply them.
Thus, bar.txt is the first element of @ARGV,  $ARGV[0].

fyi: Getopts is a parser of @ARGV

On Wed, 2004-02-18 at 08:51, David Bluestein II wrote:
> > ----------
> > From: 	dbii at mudpuddle.com[SMTP:DBII at MUDPUDDLE.COM]
> > Sent: 	Wednesday, February 18, 2004 8:51:22 AM
> > To: 	Austin at mail.pm.org
> > Subject: 	APM: Command line arguments
> > Auto forwarded by a Rule
> > 
> I know about Getopts to get command line options, but it has escaped me how
> to get a command line argument. What I want is to:
> 
> ./foo.pl bar.txt
> 
> And have foo.pl get the name bar.txt as a variable (in this case the
> filename to act upon). Where is bar.txt stored?
> 
> David
> 
> ----------
> David H. Bluestein II                         President & Lead Developer
> dbii at interaction.net                         ii, inc.
> 
> http://www.interaction.net
> -        Specializing in Designing Interactive Websites        -
> -              and Searchable Internet Databases                   -
> 
> 
> 
> 
> 
> _______________________________________________
> Austin mailing list
> Austin at mail.pm.org
> http://mail.pm.org/mailman/listinfo/austin




More information about the Austin mailing list