Just an idea, don't know whether it's useful... If you can get both files sorted (either by adding order to your sql query that generates the file, or the commandline 'sort') the problem becomes much more easy. You'd just have to traverse each file, something like this:
read word_1 from file_1 read word_2 from file_2 while not at the end of the file if word_1 < word_2 print: word_1 is not in file_2 ! read next word_1 from file_1 elseif word_2 < word_1 print: word_2 is not in file_1 ! read next word_2 from file_2 else read next word_1 from file_1 read next word_2 from file_2 end while Well, the stopping criterium is not quite correct yet, but you'll get my point. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>