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

Re^2: How come undef eq '' ??

by muba (Priest)
on Jan 30, 2013 at 15:55 UTC ( #1016092=note: print w/replies, xml ) Need Help??


in reply to Re: How come undef eq '' ??
in thread How come undef eq '' ??

Because eq is for string comparisons. undef stringifies to "", 0 stringifies to "0", and "" ne "0".

Change eq to == and it will print "In".

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016092]
help
Chatterbox?
[Tanktalus]: choroba: you need to auto-pull last hour of cb when you start up so the user gets some level of context. snicker :)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2017-09-19 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (230 votes). Check out past polls.

    Notices?