in reply to Re^4: filtering an array
in thread filtering an array
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: filtering an array
by prbndr (Acolyte) on Sep 01, 2012 at 23:03 UTC |