sub cyr { $phrase = shift; $phrase =~ y/А-яЁё/\x80-\xaf\xe0-\xf1/; return $phrase; } print cyr('АБВГДЕЁЭЮЯабвгдеёэюя');