Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Another Getopt::Long questions

by kelan (Deacon)
on Apr 10, 2003 at 14:42 UTC ( [id://249632]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://249632]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found