Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: !0 is not necessarily 1 (was Re: Secret Perl Operators: the boolean list squash operator, x!!)

by shmem (Canon)
on Aug 01, 2006 at 15:40 UTC ( #565025=note: print w/ replies, xml ) Need Help??


in reply to !0 is not necessarily 1 (was Re: Secret Perl Operators: the boolean list squash operator, x!!)
in thread Secret Perl Operators: the boolean list squash operator, x!!

Sure, !0 has been 1 in every implementation of Perl (so far), but there's no doc that supports that. It's merely an artifact of implementation.
That artifact of implementation possibly resides in handy.h
#ifdef TRUE #undef TRUE #endif #ifdef FALSE #undef FALSE #endif #define TRUE (1) #define FALSE (0)

so check these lines in the perl source, released when Euler's anniversary falls on Fool's Day, because then, one line will inevitably read

#define TRUE (2.718281525)

--shmem

_($_=" "x(1<<5)."?\n".q/)Oo.  G\        /
                              /\_/(q    /
----------------------------  \__(m.====.(_("always off the crowd"))."
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}


Comment on Re: !0 is not necessarily 1 (was Re: Secret Perl Operators: the boolean list squash operator, x!!)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2015-07-07 01:00 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 (86 votes), past polls