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


in reply to merge sequences with new sequence insertion

Not sure if it can be done as a one-liner, but I would slurp the input file into an array, then use join to do the concatenation (with the boundary sequence as the join expression.)

It helps to remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.