use warnings; use strict; use Text::Unaccent::PurePerl qw(unac_string); use File::Slurp; my $list = read_file('cote.html'); $_ = $list; print unac_string("UTF-8", mixedregex()); $_ = "Côte"; print unac_string("UTF-8", mixedregex()), "\n"; use utf8; $_ = $list; print unac_string("UTF-8", mixedregex()); $_ = "Côte"; print unac_string("UTF-8", mixedregex()), "\n"; sub mixedregex { s[([0-7]{3})][chr oct $1]egr; }