in reply to substr help

Just another way to do it:

my $dna = 'accatgagctgtacgtagcatctgagcgcgcatgactgtgactgacgtaggcagca'; my @windows = unpack 'A3' x length $dna, $dna; print "@windows";

Update:Sorry, ignore the above, I read the question too quickly.

dave

Replies are listed 'Best First'.
Re: Re: substr help
by eric256 (Parson) on May 12, 2004 at 16:19 UTC

    That doesn't actualy produce the output the OP was asking for. It produces groups of 3 which is a nice trick.


    ___________
    Eric Hodges