Welcome to the Monastery | |
PerlMonks |
Re: passing multipule -v to a scriptby mkmcconn (Chaplain) |
on Jul 29, 2002 at 22:36 UTC ( [id://186096]=note: print w/replies, xml ) | Need Help?? |
from perldoc Getopt::Long An incremental option is specified with a plus "+" after the option name: my $verbose = ''; # option variable with default value (false) GetOptions ('verbose+' => \$verbose); Using "--verbose" on the command line will increment the value of "$verbose". This way the program can keep track of how many times the option occurred on the command line. For example, each occurrence of "--verbose" could increase the verbosity level of the program. mkmcconn
In Section
Seekers of Perl Wisdom
|
|