in reply to print() on Closed File Handle Error!

Why are your opening an output file as an input (the leading < on the file name)? You should be testing every open, and I suspect this is failing on open because your output file does not exist yet. Please swap your lines 11-13 to:

open FIRST, $first_file or die "Open failed: $!"; open SECOND, $second_file or die "Open failed: $!"; open DATA_1, "</home/Alan/Desktop/sequence_data/sequence_comparison/Ja +ys_unique.txt" or die "Open failed: $!";

to see why the handle isn't open, and then swap the intent on your DATA_1 handle to get the proper behavior:

open DATA_1, '>', "/home/Alan/Desktop/sequence_data/sequence_comparison/Jays_unique.txt" or die "Open failed: $!";

Please read perlopentut to get some good ideas on how to properly approach this sort of operation.