Hello manbroski, welcome to the Monastery!
in reply to Entering the land of Perl
Prototypes are seldom used in Perl.
It is usually enough to pass a reference as the argument directly:
Moreover, counting characters in a string is idiomatically done via the tr operator. We know in advance that the possible characters are A, C, T and G only, so you can write:
Which was exactly my solution to the DNA problem on Rosalind :-)
use feature qw(say);
my $s = shift;
say join " ", map eval "$s =~ tr/$_//", qw/A C G T/;