in reply to Re^2: Difference between two arrays - is there a better way?in thread Difference between two arrays - is there a better way?
Then I recommend you adapt the concept in perlfaq4 to your situation.