APM: Command line arguments

Randall Hennig randysleek at hotmail.com
Mon Aug 16 16:50:26 CDT 2004


Actually, $ARGV[0] is the first argument and $0 is the command name.  You 
can use @ARGV and Getopt::Long::GetOptions together since GetOptions will 
just leave whatever it ignores in @ARGV


>From: Jeremy Brooks <jeremy.brooks at univista.com>
>To: David Bluestein II <dbii at mudpuddle.com>
>CC: Austin at mail.pm.org
>Subject: Re: APM: Command line arguments
>Date: 18 Feb 2004 09:14:56 -0600
>
>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
>
>_______________________________________________
>Austin mailing list
>Austin at mail.pm.org
>http://mail.pm.org/mailman/listinfo/austin

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Austin mailing list