Also check out combine. It allows you to combine lines from two files using boolean operations:
combine file1 [OPERATION] file2
Where [OPERATION] is one of [and, not, or, xor]. It allows you to quickly pull out interesting data from your files (the input files don't need to be sorted).