Better (but untested):
Note that doesn't evaluate the condition ($_ == 3) after finding a match.my @y = do {my $z = 0; grep {$z ||= $_ == 3} @x};
In reply to Re^2: flip-flop flop
by JavaFan
in thread flip-flop flop
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |