Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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.

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 imbibing at the Monastery: (2)
As of 2016-09-24 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (462 votes). Check out past polls.