查找拼接基序
作者:L. Grondin
http://rosalind.info/problems/sseq/
示例输入
ACGTACGTGACG GTA
示例输出
3 4 5
源代码:sseq-grondilu.pl
use v6; my @default-data = qw{ACGTACGTGACG GTA}; sub MAIN($input-file = Nil) { my ($dna, $search) = $input-file ?? $input-file.IO.lines !! @default-data; my $pos = 0; my @arr = gather for $search.comb -> $c { $dna ~~ m:c($pos)/$c/; take $pos = $/.from + 1; } say "{@arr}" }