Alternatively, PetreAdi can set the character encoding of both input and output to UTF-8 in one fell swoop like this:
use strict; use warnings; use open qw( :encoding(UTF-8) :std ); use autodie qw( open close ); my $filename = 'data.txt'; open my $fh, '<', $filename; while (my $row = <$fh>) { print $row; } close $fh; exit 0;
I like to use autodie, too.
Jim
In reply to Re^2: Wide character in print
by Jim
in thread Wide character in print
by PetreAdi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |