You do not need the for becuase grep loops over the array you give it. Please change:
for (@positions) {@positions = grep $_->[1] =~ /ac/i, @positions;}
to:
@positions = grep $_->[1] =~ /ac/i, @positions;
In reply to Re^5: filtering an array
by philiprbrenan
in thread filtering an array
by prbndr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |