Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by prasadbabu (Prior)
on Apr 19, 2005 at 08:12 UTC ( [id://449134]=note: print w/replies, xml ) Need Help??


in reply to Better expression for $x = !!$y||0

One way.

$y?$x=0:$y=1;

update:$x=$y?0:1 is correct as ambs mentioned.

Prasad

Replies are listed 'Best First'.
Re^2: Better expression for $x = !!$y||0
by ambs (Pilgrim) on Apr 19, 2005 at 08:18 UTC
    Not properly this (typo?). The other reply is correct ($x=$y?0:1)

    Alberto Simões

Log In?
Username:
Password:

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

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

    No recent polls found