my $wort = 'abbbattaaajqaAAAgtAWG'; my $anzahl = $wort =~ y/a/a/; print "Das Wort $wort enthält das Zeichen 'a' $anzahl mal.\n";