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 intersection). @intersection = $lc->get_intersection; print Dumper \@intersection;