How to convert letters with accents, umlauts, etc to their ASCII counterparts in Perl?

Solution 1:

As usual, if you think of a problem which most certainly is not yours only, there's already a solution on CPAN. ) In this case it's called Text::Unidecode

use warnings;
use strict;
use utf8;
use Text::Unidecode;
print unidecode('ä, ö, ü, é'); # will print 'a, o, u, e'

Solution 2:

Text::Unidecode

See the many disclaimers, but it's probably just what you need if you just have Latin text with diacritics.

Solution 3:

use s/// (=Search&Replace) instead of m// (=Match)

e.g. $name =~ s/\x00c0/A/g;