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

Re^3: undef == 0?

by codeacrobat (Chaplain)
on Oct 25, 2007 at 06:21 UTC ( [id://647082]=note: print w/replies, xml ) Need Help??


in reply to Re^2: undef == 0?
in thread undef == 0?

== forces scalar context. Both 1 and 2 are treated as decimal integers. Obviously they are not the same.

print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});

Replies are listed 'Best First'.
Re^4: undef == 0?
by stu42j (Sexton) on Oct 25, 2007 at 19:37 UTC
    Uhm, yeah. That was a rhetorical question type thing in response to swampyankee's suggestion that since undef and 0 are both false then it logically follows that undef == 0 should also be true. I was just giving an example where boolean equality is not equivalent to numeric equality.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found