in reply to print $dna each time?
in thread in need of wisdom: handling DNA strings

Wholly agreed Mike - The printing of the $dna variable with each loop iteration may be an unnecessary remnant from earlier script development - This functionality was incorporated in the code snippet I provided purely for comparitive purposes between code snippets.

The other aspects of output wrapping and printing to an output file were omitted for clarity of the code and functionality in question.

Thanks for your comments and feedback.