@ans = grep { ($_ > 0) .. 0 } @array; $found = shift @ans;
In reply to Re: Finding the first element that passes a test - then saving the rest.
by jmm
in thread Finding the first element that passes a test - then saving the rest.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |