>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 )

perldoc -m Getopt::Std
# Usage:
#   getopts('a:bc');    # -a takes arg. -b & -c not. Sets opt_* as a
#                       #  side effect.

So in your case:
getopts("n:hfc",\%option);

So n will expect an argument while h, f, and c will not (thus the 1 in the
hash).

Hope this helps

-----------------------------------------
Craig Moynes
Internship Student
netCC Development
IBM Global Services, Canada
Tel: (905) 316-3486
[EMAIL PROTECTED]


Reply via email to