use strict; use charnames (); binmode STDOUT, ":utf8"; # nicht unbedingt nötig my $string = "bla foo \x{30a1}\x{30a2}\x{30AB} bar"; # die \x{....}-Zeichen bekommst du automatisch bei der Konvertierung mit Encode::decode for (split //, $string) { my $charname = charnames::viacode(ord $_); if ($charname =~ /^KATAKANA LETTER (SMALL )?(.*)/) { my $small = $1; my $translit = $2; if ($small) { print lc $translit; } else { print ucfirst lc $translit; } } else { print $_; } }