in reply to Deleting specific element in array in FOREACH loop
Then you write a version of @newarray=grep {&subroutine($_)} @oldarray. The new array will only contain the elements that the subroutine returned true for.
Hays
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Deleting specific element in array in FOREACH loop
by awohld (Hermit) on Sep 15, 2006 at 20:36 UTC |