在 DNA 中寻找基序
作者:L. Grondin
http://rosalind.info/problems/subs/
示例输入
GATATATGCATATACTT ATAT
示例输出
2 4 10
源代码: subs-grondilu.pl
use v6; my @default-data = qw{GATATATGCATATACTT ATAT}; sub MAIN($input-file = Nil) { my ($S, $t) = $input-file ?? $input-file.IO.lines !! @default-data; my @arr = gather for $S.match(/$t/, :overlap) { take 1+.from }; say "{@arr}" }