in reply to Re: Finding values position in arrayin thread Finding values position in array
unless 'list' is large or the test has side effects or is expensive.
grep processes all of the list whereas the for loop stops on the first successful match.