Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 cooling their heels in the Monastery: (6)
As of 2014-08-23 15:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (174 votes), past polls