Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Why my variable is not 0 ?

by pcouderc (Monk)
on Jan 08, 2016 at 15:09 UTC ( [id://1152312]=note: print w/replies, xml ) Need Help??


in reply to Re: Why my variable is not 0 ?
in thread Why my variable is not 0 ?

Thank you all.
It is more clear to me.
My conclusion is that false is not always 0...
But it is not a problem to take care of.

Replies are listed 'Best First'.
Re^3: Why my variable is not 0?
by Athanasius (Archbishop) on Jan 08, 2016 at 15:17 UTC

    Hello pcouderc,

    My conclusion is that false is not always 0...

    No, indeed. The definition of false in Perl is given in perlsyn#Truth-and-Falsehood:

    The number 0, the strings '0' and "", the empty list (), and undef are all false in a boolean context. All other values are true. Negation of a true value by ! or not returns a special false value. When evaluated as a string it is treated as "", but as a number, it is treated as 0. Most Perl operators that return true or false behave this way.

    Hope that helps,

    Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

      Yes, it does... Thank you !

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found