计算 DNA 核苷酸

作者:gerdr

http://rosalind.info/problems/dna/

示例输入

AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC

示例输出

20 12 17 21

源代码: dna-gerdr.pl

use v6;

my $default-input = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC";

sub MAIN($input = $default-input) {
    "{<A C G T>.map({ +$input.comb(/$_/) })}".say;
}