Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 about the Monastery: (6)
As of 2014-09-20 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls