Alternative content
sub kmers {
my $seq = shift or return;
my $len = length $seq;
my @kmers;
for (my $i = 0; ($i + $KMER_SIZE) <= $len; $i++) {
my $kmer = substr($seq, $i, $KMER_SIZE);
print "$kmer\n";
push @kmers, substr($seq, $i, $KMER_SIZE);
}
return \@kmers;
}