smoss has asked for the wisdom of the Perl Monks concerning the following question:

Hi Guys, I'm new to this so maybe this is an easy question. I have two arrays with various numbers in each. I want to take each element in the first array and compare it with each element in the second array. If the element does not appear in the second array I want to add it to a third array. How can I do this? Thanks in advance.

Replies are listed 'Best First'.
Re: Comparing arrays
by dru145 (Friar) on Apr 23, 2002 at 13:39 UTC
      This is exactly what I want! Thanks!
Re: Comparing arrays
by vek (Prior) on Apr 23, 2002 at 13:32 UTC
    In the past I've used Array::Compare with great success. Check it out it might be just what you need.

    -- vek --
      I should have worded my question as Comparing elements within two arrays.