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


in reply to Re: how to merge the files of DNA sequences?
in thread how to merge the files of DNA sequences?

perl -lne '/^>(.*)/ or$H{$1}.=$_;END{print for map{">$_\n$H{$_}"}keys%H}' file1.txt file2.txt

Replies are listed 'Best First'.
Re: little golf
by wfsp (Abbot) on Jul 24, 2004 at 11:18 UTC
    Ok, ok I'm impressed! I'm still at the 'baby idiom' stage.

    ...and anyway, I like typing!