One way.
update:$x=$y?0:1 is correct as ambs mentioned.
Prasad
In reply to Re: Better expression for $x = !!$y||0 by prasadbabu in thread Better expression for $x = !!$y||0 by borisz