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; }