perl_mystery has asked for the wisdom of the Perl Monks concerning the following question:
For some reason with the below code,I am not getting the options given on command line,every option has the value "1",any idea?
use Getopt::Long; use Data::Dumper; my %options = (); #my %options = ('des' => \$des, 'a' => \$a, 'd' => \$d, 'r' => \$r, 'v +' => \$v); GetOptions (\%options, 'des', 'a', 'd', 'r', 'v'); print Dumper( \%options ); OUTPUT:- $VAR1 = { 'v' => 1, 'des' => 1, 'a' => 1, 'r' => 1, 'd' => 1 };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getopt::Long error
by ambrus (Abbot) on Mar 10, 2011 at 08:01 UTC | |
|
Re: Getopt::Long error
by Anonymous Monk on Mar 10, 2011 at 00:54 UTC |