You could also do it with a regexp.Which would look something like:
my $dna = 'accatgagctgtacgtagcatctgagcgcgcatgactgtgactgacgtaggcagca'; my $increment = 3; my $substr = 10; my @windows = $dna=~/(?=(.{$substr})).{$increment}/gs; print "$_\n" for @windows;
In reply to Re: Re: substr help
by ysth
in thread substr help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |