#! perl -w use strict; use Text::CSV_PP; use Data::Dumper; $csv = Text::CSV_PP->new(); # create a new CSV parser object while (defined($line = <> )) { chomp $line; $line =~ s/\" $/\"/; ### kludge to remove space after the last doublequote, if any print $line . "~~\n"; $status = $csv->parse($line); printf "status=%d\n", $status; unless ($status) { printf "error=%d %s\n", ( $csv->error_diag ()); } @col = $csv->fields(); print Dumper \@col; print "--new line--\n"; } #while