@array1 = qq(13470660 13471850 14028274 14028286); @array2 = qq(14028145 14028286 13476691 13471850); # where the pairs are: 13470660 14028145 13471850 14028286 14028274 13476691 14028286 13471850 # I want the result to be the following because 14028286 13471850 occur in each: 13470660 14028145 13471850 14028286 14028274 13476691