my %replacements = ('ä' => 'ae', 'Ä' => 'Ae', ......); $string =~ s/(.)/ exists $replacements{$ 1} ? $replacements{$ 1} : $ 1 /ge;