Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Don't ask to ask, just ask
 
PerlMonks  

Re: Range in Getopt

by toolic (Chancellor)
on Oct 03, 2012 at 13:54 UTC ( #997063=note: print w/ replies, xml ) Need Help??


in reply to Range in Getopt

Another way (stealing james2vegas's die message):

use warnings; use strict; use Getopt::Long; my $_debug = 1; # or whatever default you want it to be GetOptions('d=i' => \$_debug) or die("Invalid commmand line options.") +; die "Invalid Debug Level ($_debug)" if $_debug<1 or $_debug>4; print "\$_debug = $_debug\n";


Comment on Re: Range in Getopt
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-04-17 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls