{ my $x; if( $x = f() and g($x) ) { ... } } #### { last unless( my $x = f() ); last unless( g($x) ); ... }