my $csv = Text::CSV-> new ({ binary => 1 }); while (my $row = $csv->getline (*INFILE) { my @fields = @$row; } $csv->eof or $csv->error_diag;