if (my $x = do {my $x = f(); $x and g($x)}) { print "cheerful: $x\n"; }