Re: Command line argurments to perl program

2003-04-03 Thread Scott R. Godin
Madhu Reddy wrote: > Hi, > I want to pass command line arguements to perl > program ? > How to do this ? There's Getopt::Std and Getopt::Long. IMHO the Getopt::Long interface and how it accesses the command line options is superior to Getopt::Std and supports both short (-t) and long (--type

Re: Command line argurments to perl program

2003-04-02 Thread david
Madhu Reddy wrote: > Hi, > I want to pass command line arguements to perl > program ? > How to do this ? > Perl stores args passed to your script at @ARGV. you could check what's there by looking at this array like: #!/usr/bin/perl -w use strict; #-- #-- cat.pl #-- while(@ARGV){ pri

RE: Command line argurments to perl program

2003-04-02 Thread David Olbersen
David Olbersen iGuard Engineer 11415 West Bernardo Court San Diego, CA 92127 1-858-676-2277 x2152 > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 3:16 PM > To: Madhu Reddy; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: R

RE: Command line argurments to perl program

2003-04-02 Thread Dan Muey
> Hi, > I want to pass command line arguements to perl > program ? > How to do this ? There's also modules if it's a complicated list of command options. Not sure of the name exactly, just go to search.cpan.org and take a look. DMuey > > Thanks > -Madhu > > >

RE: Command line argurments to perl program

2003-04-02 Thread Dan Muey
> Hi, > I want to pass command line arguements to perl > program ? > How to do this ? They are stored in an array named @ARGV So ./script.pl -q You'd say :: if(defined $ARGV[0] && $ARGV[0] =~ m/^-q$/) { print "I am Q!\n"; } > > Thanks > -Madhu > > > __