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";
In reply to Re: Range in Getopt
by toolic
in thread Range in Getopt
by Ammu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |