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

Re: Range in Getopt

by toolic (Bishop)
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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997063]
help
Chatterbox?
LanX bad day monks ?
[LanX]: hope you find sleep
[shmem]: LanX: which one?
[LanX]: the last
Discipulus yes a very bad day
[shmem]: grandola, vila morena
[shmem]: LanX: ah, that one. You'll get the bug reports also :P
[Discipulus]: upvote me! i'll make pm great again! ;=)
[shmem]: Discipulus reminds me of an irish saying: "I would guess a tomorrow can wait 'til this day is done" :-)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-04-29 22:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (534 votes). Check out past polls.