my $string = "Hallo Welt da draussen"; my $count = $string =~ tr/a/a/; print $count;