Re: Using Getopt::Std

2004-01-13 Thread Hacksaw
> > > > Hi, > > i am using the Getopt::Std package in my code. > > > > > > use Getopt::Std; > > > > getopts('s:'); > > > > $a = $opt_s By the way, you don't really need to assign the $opt_x variables to a new variable. $opt_s will be persistant, unless you run getopt again, which would b

Re: Using Getopt::Std

2004-01-13 Thread William.Ampeh
Put quotes around your arguments. Use single quotes if you are not doing variable substitution, and double quotes if otherwise. That is: my_program.pl -s 'will[1]' "$will" __ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Using Getopt::Std

2004-01-13 Thread Wiggins d Anconia
> Hi, > i am using the Getopt::Std package in my code. > > > use Getopt::Std; > > getopts('s:'); > > $a = $opt_s > > > this is how i run my program from command line " > > > my_program.pl -s pattern > > now if "pattern" is something like abcd[12] how do i > make my program accept the in

Re: Using getopt::std return hash with value of 1 rather than argument

2001-07-05 Thread Craig Moynes/Markham/IBM
>The perldoc for getopt::std states: >Hash keys will be x (where x is the switch name) with key >values the value of the argument or 1 if no argument is >specified This is true for getopt, but not getopts. Getopts puts the parameter in the hash table (I am working on 5.005_03 built for aix ) per