use List::Compare; use Data::Dumper; @Llist = qw(abel abel baker camera delta edward fargo golfer); @Rlist = qw(baker camera delta delta edward fargo golfer hilton); $lc = List::Compare->new(\@Llist, \@Rlist); #Get those items which appear at least once in both lists (their inter +section). @intersection = $lc->get_intersection; print Dumper \@intersection;
Cheers,
Brent
In reply to Re: help with a function that will cut out redundancy across two lists
by dorko
in thread help with a function that will cut out redundancy across two lists
by annakarenina83
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |