Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-09-20 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (158 votes), past polls