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