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.
In reply to Re^2: Finding values position in array
by GrandFather
in thread Finding values position in array
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |