Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Truth and Falsehood

by jo37 (Curate)
on Nov 01, 2019 at 22:04 UTC ( [id://11108236]=note: print w/replies, xml ) Need Help??


in reply to Truth and Falsehood

The "special false" is dual valued. You can reproduce it like this:

$false = ''; $foo = $false + 0;
(Which gives a warning.) Now "$false" is exactly the same as "not 1".

Or more explicit:

use Scalar::Util 'dualvar'; $false = dualvar(0, '');

Replies are listed 'Best First'.
Re^2: Truth and Falsehood
by haukex (Archbishop) on Nov 01, 2019 at 23:02 UTC

    Or just !1 ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2025-12-08 01:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (87 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.