Thread integer und split
(3 answers)
Opened by nano at 2015-04-05 02:26 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 #!/usr/bin/perl use strict; use warnings; my $word = 'abbbattaaajqaAAAgtAWG'; print cound_chars('a',$word)."\n"; sub cound_chars { return ( grep $_ eq $_[0], split //, $_[1] ) + 0; } Last edited: 2015-04-05 14:13:36 +0200 (CEST) |