#!perl use utf8; use strict; use diagnostics; my $name = '东西.txt'; { open my $fh, '>', $name or die "could not open file <$name> for writing: $!"; binmode $fh, ':utf8'; print $fh "你好世界\n"; close $fh; };