Subject: | can't handle newlines in fields |
Heya,
Text::CSV::Simple can't handle newlines in the content.. For example, this is valid content of a CSV file:
"Multimap,
offices of",my street,London,EC1N 2NS,GB,1234,,,16,,,,,
Which Text::CSV_XS can handle (using binary => 1).
The problem stems from using the approach:
# in read_file()
foreach my $line (@lines) {
I haven't had time to look into it, but it should be possible to use:
$csv_cs->getline( $fh )
Which gets around the problem (also means you're not responsible for reading file content). It may require a change in approach though...
hth,
-Steve