in reply to Situation where warning "Found = in conditional, should be" seems obsolete
or maybe the second "and" would be turned to "or", but it would be confusing anyway.$_ % 2 and $has_odd = 0 and last;
More idiomatic way of writing this would be
if you insisted on using no if/unless. I'd probably use$_ % 2 or $has_even = 1, last;
but YMMV.$has_even = 1, last unless $_ % 2;
Update: s/if/unless/. Thanks Athanasius.
|
|---|