if (1 and ($result = (func($param))[0])) { print "1\n"; } else { print "0\n"; } print "$result\n"; sub func { return (0, 1, 2); }