in reply to use of uninitialized value in array

Check the FAQ for an alternate method. perldoc -q "intersection of two arrays"
Bill