>SEQUENCE-ID-STRING commentary string SEQUENCE_LETTERS_AT_MOST_80_PER_LINE... #### # require that there be three file name args on the command line: # -- input file1 # -- input file2 # -- output file # for each input file: # open it # read one line at a time # chomp the line to remove final line-feed # if line starts with ">", it's the start of a new sequence, so: # if there was a sequence before this one, save it in %seq_hash # set current sequence to an empty string # otherwise, line starts with a letter, so: # append contents of line to current sequence # After reaching the end of the second file, save current sequence in %seq_hash # open the output file # Loop over the keys of %seq_hash # write the ID-string to the output file # if necessary, add line-feeds into the sequence string at 80-char intervals # write the sequence string to the output file