Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Result should be @mainarray with all the original elements, but purged of @filterarray elements. So, if @filterarray contains "the" and @mainarray contains "In to the wild" or "The catcher in the rye", after the job they should look like "In to wild" and "catcher in rye". Any help greatly appreciated. Thanks in advance.foreach @filterarray { if @mainarray element contains @filterarray element { strip out @filterarray element from @mainarray element} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array filter
by ikegami (Patriarch) on Nov 18, 2008 at 08:09 UTC | |
by ikegami (Patriarch) on Nov 18, 2008 at 08:15 UTC | |
|
Re: array filter
by why_bird (Pilgrim) on Nov 18, 2008 at 08:10 UTC | |
|
Re: array filter
by LanX (Saint) on Nov 18, 2008 at 10:11 UTC | |
by Anonymous Monk on Nov 18, 2008 at 11:34 UTC | |
by LanX (Saint) on Nov 18, 2008 at 11:39 UTC | |
by Anonymous Monk on Nov 18, 2008 at 11:46 UTC | |
by LanX (Saint) on Nov 18, 2008 at 11:52 UTC | |
by Anonymous Monk on Nov 18, 2008 at 11:48 UTC | |
by LanX (Saint) on Nov 18, 2008 at 11:47 UTC | |
|
Re: array filter
by MidLifeXis (Monsignor) on Nov 18, 2008 at 17:52 UTC |