I have a code that parses a csv file and the data also contains newline. But Text::CSV breaks when it encounters "\n" inside the data
This is the parse code
use Data::Dumper;
use Text::CSV;
my $csv = Text::CSV->new ({ binary=> 1, eol => $/, allow_loose_quotes => 1, allow_loose_escapes=> 1 }) || die $!;
#print Dumper($csv);
my $file = $ARGV[0];
open my $csv_handle, $file or die $!;
while (my $row = $csv->getline($csv_handle)) {
print Dumper($row);
}
This is the data
196766,31,"MR SRINIVASALU LAKSHMIPATHY\"DEC\"\
\"71"
196766,56,"255233.47"