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
In reply to Re: Deleting specific element in array in FOREACH loop
by hgolden
in thread Deleting specific element in array in FOREACH loop
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |