use strict; use warnings; use Text::CSV_XS; use Data::Dumper; my $tr_csv = Text::CSV_XS->new({ binary => 1, eol => $/ }); open(my $tr,"<",'file.csv') or die "Failure opening data file: $!"; while (my $row = $tr_csv->getline($tr)) { print $tr_csv->status(); print @$row; print Data::Dumper->Dump($row); }