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
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
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
> 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
>
>
>
> 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
>
>
> __
Hi,
I want to pass command line arguements to perl
program ?
How to do this ?
Thanks
-Madhu
__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad