in reply to perl to add results of 2 arrays from 2 files together.

You appear to have the data in two hashes: %seen and %seen2 and you want to merge them. Therefore, try studying the FAQ response: How do I merge two hashes?. Does this provide the answer you require?

Replies are listed 'Best First'.
Re^2: perl to add results of 2 arrays from 2 files together.
by john.tm (Scribe) on Aug 26, 2014 at 14:51 UTC
    can you merge hashes fron 2 different files?
      Yes. The hashes' data resides in memory; where it came from originally is irrelevant.
      You actually don't even need to merge hashes if you consider that you can do the whole thing with one single hash. Just read the first file, store the values in a hash, read the second file, add the values to those already in the hash for each key. And you're basically done.