in reply to Re^3: How can I get correct result in counting 3-letter words?
in thread How can I get correct result in counting 3-letter words?
True, I was just curious about the performance difference between substr and /.../g. And I don't know this bioinformatics stuff well enough to know what's a valid group and what isn't, and whether you can assume things will break on the right boundaries (or what to do with extra letters if they don't). But doesn't your final solution with /.../gs give "AAA" and "GNT"? Should it be /[ACGT]{3}/gs to make it skip to the next valid set of three?
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
|
|---|