remove use open ':locale'; say encode( q{cp1251}, decode_entities(qq[{g}:${google_text}{t}:${translate_ru_text}}]) ); it is sufficient