>
>
> > 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
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
> 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
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 index 12 as a part of the
string for o
>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
> Clean this up as:
> if ($option{n}) {
> $domain = $option{n}
> add();
> }
>
> Don't use ARGV once you have used getopt (or getopts). The hash you
> specify to the option getter
> creates the keys as the flags and the values as the associated parameter.
>
> #if -f, then set $path
> if