in reply to Difference between two arrays - is there a better way?
And if you insist on a map/grep solution:
This solution doesn't rely on the dependencies mentioned above either.my %disabled = map {($_, 1)} @list2; my @active = grep {!$disabled{$_}} @list1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Difference between two arrays - is there a better way?
by blindluke (Hermit) on Aug 09, 2011 at 09:36 UTC |