in reply to Matching array elements not in another array
This is a FAQ. See perlfaq4 or perldoc -q intersection for how to find the intersection of two arrays.