in reply to Trying to get fancy...
--Jimuse strict; my (@listA, @listB); $listA[0] = [qw(1 foo bar)]; $listB[0] = [qw(1 bar baz)]; my %hash = map { $_ => 1 } @{$listA[0]}; my @c = grep {! exists $hash{$_}} @{$listB[0]}; print "$_\n" foreach (@c);
Update: changed @listX[0] as per seanbos reply. Thanks seanbo, I originally had it right but forgot to change it back after an unfruitful experiment. Should've used -w.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Trying to get fancy...
by seanbo (Chaplain) on Nov 28, 2001 at 23:17 UTC |