It appears that comparing the files consists in comparing the first two elements in each line. This doesn't make sense based on the information I have seen about the format of FASTA files. Perhaps you can provide a short sample of two of the files you will be working with?
Also, you can't use simple scalar comparisons with hashes. Modules like Data::Compare can help. See also compare hash.
But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)