in reply to Re: Perl Code Runs Extremely Slow
in thread Perl Code Runs Extremely Slow

That's unlikely to work very well. File 1 is gigantic, so reading it all into a single a hash is likely to cause either an out-of-memory error or at least run into swap and run really slowly. There's a good summary of how much memory a hash will use in Devel::Size - it's likely to be much more than the size of the file which just about guarantees that it can't fit in memory in this case.

-sam