in reply to Subtracting Lists

make a hash with the keys beeing elements from the first list.
do the same for the other list.
you end up with 2 hashes.
now you can traverse the keys of one hash and see if it's in the other hash.
that way would be much faster than the usual O(n^2) you'd get from doing traversal of the second list for every element of the first one.