for (my $pos = $window; $pos <= length($seq); $pos += $window+1) { substr($seq, $pos, 0, "\n"); }