in reply to Re^3: deleting a specific element from an array
in thread deleting a specific element from an array
Of course, if you only wanted to delete exact matches, you could extend ikegami's solution like so:
@array = grep !/^($dels)$/, @array;
Now, 'apple' will no longer result in 'apple pie' being deleted.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: deleting a specific element from an array
by kyle (Abbot) on Dec 03, 2008 at 03:18 UTC | |
by oko1 (Deacon) on Dec 03, 2008 at 18:09 UTC | |
by ikegami (Patriarch) on Dec 03, 2008 at 18:22 UTC | |
by oko1 (Deacon) on Dec 04, 2008 at 01:13 UTC | |
by kyle (Abbot) on Dec 03, 2008 at 18:20 UTC |