in reply to Removing numerous entries from an array
Hello stevieb,
In the spirit of TMTOWTDI, here’s a variation on Eily’s ++solution that doesn’t require the construction of a hash:
use strict; use warnings; use Data::Dump; use List::MoreUtils 'none'; my @a = (1, 2, 3, 4, 3, 5, 3); my @find = (3, 4); dd grep { my $e = $_; none { $e == $_ } @find } @a;
Output:
22:52 >perl 1371_SoPW.pl (1, 2, 5) 22:52 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|