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

Re^3: Better expression for $x = !!$y||0

by merlyn (Sage)
on Apr 19, 2005 at 14:05 UTC ( #449249=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Better expression for $x = !!$y||0
in thread Better expression for $x = !!$y||0

$x = int !!$y;
There's no promise in the docs that the result of "!" will be "1" and "undef". It could be "37" for "a true value".

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


Comment on Re^3: Better expression for $x = !!$y||0
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-03 22:52 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 (57 votes), past polls