in reply to Finding the first element that passes a test - then saving the rest.
@ans = grep { ($_ > 0) .. 0 } @array; $found = shift @ans; [download]