in reply to substr help

This method should be a bit more efficient that either substr in a loop or using the regex engine.

#! perl -slw use strict; my $dna = 'accatgagctgtacgtagcatctgagcgcgcatgactgtgactgacgtaggcagca'; my $n = int( ( length( $dna ) - ( 10 - 3 ) ) / 3 ); print for unpack "(A10 X7)$n", $dna; __END__ C:\Perl\test>test accatgagct atgagctgta agctgtacgt tgtacgtagc acgtagcatc tagcatctga catctgagcg ctgagcgcgc agcgcgcatg gcgcatgact catgactgtg gactgtgact tgtgactgac gactgacgta tgacgtaggc cgtaggcagc

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail