http://www.perlmonks.org?node_id=377103

newperler has asked for the wisdom of the Perl Monks concerning the following question:

I have 2 fasta files with each storing DNA sequences under different individual names respectively. eg.
>John >John atgc gggg >Tom >Tom atgg ccgg ... ... (file1) (file2)
Now I need to merge the sequences from the 2 files under every same name and output as a new file. eg.
>John atgcgggg >Tom atggccgg ... (newfile)
I would like to use hash to store the names and sequences then push them into new hashes. Since I am really a newbie, so could anyone tell me how to merge the values of 2 hashes? thanks a lot!