use warnings; use strict; my $a = 6; my $porter = (($a & 1) != 0) ? 1 : 0; print "porter=$porter=\n"; __END__ porter=0=