my $var; ... { my $var = $var; ... } #### if ( sub { our @f; local *f = $_[0]; (@f = some_code()) == 1 || (@f = some_other_code()) == 1 }->(\my @f) ) { #... } #### if ( sub { our @f; local *f = $_[0]; ( sub { our @f; local *f = $_[0]; (@f = some_code()) == 1 }->(\@f) || sub { our @f; local *f = $_[0]; (@f = some_other_code()) == 1 }->(\@f) ) }->(\my @f) ) { #... } #### if (my @f = do { my @f; ((@f = some_code()) == 1 || (@f = some_other_code()) == 1) ? @f : () }) { #... }