среда, 10 декабря 2025 г.

perl русский текст в консоли

 

#!perl -w
use utf8 ; #Do not use this pragma for anything else than telling Perl that your script is written in UTF-8.
#use Win32::Console::ANSI;
#use encoding 'utf8'; depricated
use Encode qw(encode decode); # must be new!



my %hash = ("apple"=>1,"drive"=>2);

$out_text =  encode( "cp866" , "Программа  в переменной" );


print $out_text;

Комментариев нет:

perl русский текст в консоли

  #!perl -w use utf8 ; #Do not use this pragma for anything else than telling Perl that your script is written in UTF-8. #use Win32::Consol...