Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^2: Little annoying mistakes ... of others

by toolic (Bishop)
on Dec 07, 2008 at 02:59 UTC ( #728634=note: print w/replies, xml ) Need Help??

in reply to Re: Little annoying mistakes ... of others
in thread Little annoying mistakes ... of others

Along the sames lines, and much more likely, is to pass in a numeric option on the command line whose value is quite probably 0. For example, I have a histogram script in which I can pass in the minimum value. Unless I check the value using defined, the thing just doesn't work right:
use strict; use warnings; use Getopt::Std; our $opt_m; getopts('m:'); print "$opt_m\n" if ($opt_m); # Wrong #print "$opt_m\n" if (defined $opt_m); # Right

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://728634]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2016-10-26 06:53 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (336 votes). Check out past polls.