http://qs321.pair.com?node_id=249632


in reply to Re: Another Getopt::Long questions
in thread Another Getopt::Long questions

I don't remember if it's mentioned specifically in the POD, but from my usage, the first option is always the name of the key it will use. This is handy when you want to use one character options or bundling. As in:

use Getopt::Long; Getopt::Long::Configure('bundling'); my %options; GetOptions( \%options, 'LongName|L=s' ); if ($options{LongName}) { # do something with $options{LongName} }
And the user can specify that option either as:
prog.pl --longname something
or
prog.pl -L something

kelan


Perl6 Grammar Student