<?xml version="1.0" encoding="windows-1252"?>
<node id="997063" title="Re: Range in Getopt" created="2012-10-03 09:54:41" updated="2012-10-03 09:54:41">
<type id="11">
note</type>
<author id="622051">
toolic</author>
<data>
<field name="doctext">
Another way (stealing [james2vegas]'s die message):

&lt;c&gt;
use warnings;
use strict;
use Getopt::Long;

my $_debug = 1; # or whatever default you want it to be
GetOptions('d=i' =&gt; \$_debug) or die("Invalid commmand line options.");

die "Invalid Debug Level ($_debug)" if $_debug&lt;1 or $_debug&gt;4;

print "\$_debug = $_debug\n";

&lt;/c&gt;

</field>
<field name="root_node">
996976</field>
<field name="parent_node">
996976</field>
</data>
</node>
