- or download this
open(my $fh, '<:encoding(UTF-8)', $language_qfn) or die;
while (<$fh>) {
...
}
- or download this
binmode(STDIN, ':encoding(UTF-8)');
while (<STDIN>) {
...
}
- or download this
use Encode qw( decode );
...
$_ = decode('UTF-8', $_);
...
}
- or download this
open(my $fh, '>:encoding(UTF-8)', $output_fqn) or die;
print $fh ($text);
- or download this
binmode(STDOUT, ':encoding(UTF-8)');
print($text);
- or download this
use Encode qw( encode );
open(my $fh, '>', $output_fqn) or die;
print $fh (encode('UTF-8', $text));