Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Undefined vs empty string

by Cristoforo (Deacon)
on Jun 05, 2013 at 02:34 UTC ( #1037093=note: print w/ replies, xml ) Need Help??


in reply to Undefined vs empty string

I think you could just write if (!$string) if you were sure $string couldn't be 0 or '0'. (a zero or zero in quotes)

Not sure if that answers your question.

Update: Just saw that Athanasius and BrowserUk posted similar answers.


Comment on Re: Undefined vs empty string
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-07-31 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls