{$IFDEF WINDOWS}
SetTextCodePage(Output, CP_UTF8);
SetConsoleOutputCP(CP_UTF8);
{$ENDIF}
writeln('Hello World and 你好');
use utf8;
binmode STDOUT, ':utf8';
print('Hello World and 你好');
The import use utf8 tells perl that your script is encoded in utf8. binmode sets the encoding for STDOUT to utf8. If outputting to the console, you need to chcp 65001 to set the UTF-8 code page, otherwise the glyphs will be wrong.