miscellaneous/learn_wide_character/say-perl6-say.pl

Permalink

#!/usr/bin/env perl
# utf8

use utf8;

use strict;
use warnings;
use Perl6::Say;

say "ハロー";   # OK
say "ワールド"; # OK

open my $fh, '>', 'temp.txt' or die;
# say $fh "ハローワールド"; # syntax error
$fh->say("ハローワールド"); # Wide charcter
undef $fh;