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

Re: OEO, a zero that evaluates to true?

by particle (Vicar)
on Jan 08, 2002 at 18:17 UTC ( #137128=note: print w/ replies, xml ) Need Help??


in reply to OEO, a zero that evaluates to true?

there's an error in the last line of your code:

print "oero+oero: ", $oero-$oero, "\n";

although you're printing "oero+oero, you're calculating $oero-$oero, which is not the same, because if $oero was any number, subtracting itself would probably yield 0. instead, it should read

print "oero+oero: ", $oero+$oero, "\n";

which fortunately, evaluates as 0, and stands as a good example of 0 but true.

~Particle


Comment on Re: OEO, a zero that evaluates to true?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2015-07-30 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls