in reply to Comparing arrays and returning number of similar elements

You want the intersection of two arrays. The answer to "How do I compute the intersection of two arrays" in perlfaq4 should help. Good luck :)

--
brian d foy <brian@stonehenge.com>
Subscribe to The Perl Review
  • Comment on Re: Comparing arrays and returning number of similar elements

Replies are listed 'Best First'.
Re^2: Comparing arrays and returning number of similar elements
by Anonymous Monk on Feb 09, 2006 at 23:30 UTC
    Yes, but that assumes that each element in the list is unique.