The stupid question is the question not asked | |
PerlMonks |
Re^3: How to check if a scalar value is numeric or string?by bv (Friar) |
on Aug 27, 2009 at 15:35 UTC ( [id://791684]=note: print w/replies, xml ) | Need Help?? |
Your requirement mentions GetOptions. Does this mean you are using Getopt::Long? If so, how are you specifying the option? opt=s, opt:s, opt=i, opt:i, opt, etc? Getopt::Long is usually good about setting sane values. If you asked for an integer with :i, it will set your value to 0 if there was no argument given, so you can test with exists to see if it was set.
$,=' ';$\=',';$_=[qw,Just another Perl hacker,];print@$_;
In Section
Seekers of Perl Wisdom
|
|