Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Checking Variable for Not Null

by hippo (Bishop)
on May 27, 2015 at 15:00 UTC ( [id://1128012]=note: print w/replies, xml ) Need Help??


in reply to Checking Variable for Not Null

You haven't said what you understand by "null" in this context. "null" is not a concept in Perl. We have defined and we have true. eg:

ValueTrue?Defined?
undefNoNo
0NoYes
''NoYes
1YesYes
'TIMTOWTDI'YesYes

BTW, do you really find unless ! to be clearer than if?

Replies are listed 'Best First'.
Re^2: Checking Variable for Not Null
by dirtdog (Monk) on May 27, 2015 at 15:16 UTC

    Good point Hippo. If is much clearer.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-20 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found