if ((my @f = some_code()) == 1 || (@f = some_other_code()) == 1) { # I only expect one item back. Use $f[0] here. }