use Text::CSV_XS; use IO::File; my $io = IO::File->new( $filename, '<' ) or die "Can't read $filename: $!"; my $csv = Text::CSV_XS->new(); until ( $io->eof ) { my $row = $csv->getline($io)); # do something with the ARRAYref $row }