$string = "Hallo Welt da draussen!"; my $count = () = $string =~ m/a/g; print $count;