use encoding 'iso-8859-1'; my $string = "vorname nachname ähhh"; $string =~ s/\b(\p{IsAlpha})/\U$1/g; print $string;