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