in reply to find unique lines in two files

You say "two files" but open a third:

open (FH1, @ARGV[2]);

What's that about?