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

for maximum readibility and if you are doing this kind of conversion in more than one place, you can also create a new "booleanize" operator:
sub booleanize ($) { shift ? 1 : 0 } $x = booleanize $y;