Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: The best "true zero" is...

by ikegami (Pope)
on Jul 28, 2010 at 16:35 UTC ( #851749=note: print w/ replies, xml ) Need Help??


in reply to Re: The best "true zero" is...
in thread The best "true zero" is...

No.

$ perl -wle'print "0 but true" eq "0E0" ?1:0' 0

They are both silently equal to zero yet true, but so are the other poll options (except "0x0").

$ perl -wle'print 0+"0 but true"' 0 $ perl -wle'print 0+"0E0"' 0 $ perl -wle'print "0 but true" ?"true":"false"' true $ perl -wle'print "0E0" ?"true":"false"' true


Comment on Re^2: The best "true zero" is...
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://851749]
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: (9)
As of 2014-12-28 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls