use 5.010; #gives you 'say' my $test = rand > 0.5; # two postfix tests: say 'TRUE' if $test; say 'FALSE' if not $test; # a one-liner conventional if if($test) { say 'TRUE' } else { say 'FALSE' } # two lines, using 'and' and 'or': $test and say 'TRUE'; $test or say 'FALSE'; # a ternary (my favourite): say $test ? 'TRUE' : 'FALSE';