Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: why won't is print every value???

by perlguy (Deacon)
on Jun 05, 2002 at 20:33 UTC ( [id://171999]=note: print w/replies, xml ) Need Help??


in reply to Re: why won't is print every value???
in thread why won't is print every value???

This is a tangent, but you should be careful with code like:
die "\nYou haven't entered enough parameters !!\n\n" unless $ARGV[1];
because if the second argument passed to the script evaluates to false (0,undef,''), the script will die even if you didn't wish it to do so. a way to prevent this:
die "\nYou haven't entered enough parameters !!\n\n" unless defined $A +RGV[1];

Replies are listed 'Best First'.
Re: Re: Re: why won't is print every value???
by erasei (Pilgrim) on Jun 05, 2002 at 21:02 UTC
    Aah, very true, but in this case, he wants to have +some+ input. An 'undef' or an empty string should be dropped because it isn't a valid option. But you are right in the grand scheme of things.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-19 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found