use strict; use warnings; use Text::CSV; use Data::Dumper; use Devel::Peek; open my $f, ">", "test.tmp"; print $f "\xD0\x81"; close $f; open my $io, "<", "test.tmp" or die "$!"; my $csv = Text::CSV->new ({ binary => 1, eol => "\012" }); while (my $row = $csv->getline ($io)) { print Dumper $row; Dump $row; } #### $VAR1 = [ "\x{401}" ]; SV = IV(0x245c998) at 0x245c9a8 REFCNT = 1 FLAGS = (PADMY,ROK) RV = 0x2550980 SV = PVAV(0x23f49b8) at 0x2550980 REFCNT = 2 FLAGS = () ARRAY = 0x24bdab0 FILL = 0 MAX = 3 ARYLEN = 0x0 FLAGS = (REAL) Elt No. 0 SV = PV(0x23f22a0) at 0x2412470 REFCNT = 1 FLAGS = (POK,pPOK,UTF8) PV = 0x260e200 "\320\201"\0 [UTF8 "\x{401}"] CUR = 2 LEN = 16