- or download this
open(my $fh, '>:encoding(UTF-8)', ...) or die;
print($fh $text);
- or download this
use open ':std', ':encoding(UTF-8)';
print($text);
- or download this
use Encode qw( encode );
print($fh encode("UTF-8", $text));
- or download this
use Encode qw( encode );
print(encode("UTF-8", $text));
- or download this
>perl -wle"print chr(0x2660)"
Wide character in print at -e line 1.
...
>perl -MData::Dumper -we"print Dumper chr(0x2660)"
$VAR1 = "\x{2660}";