in reply to Comparison of the parsing features of CSV (and xSV) modules
Just for the record, Text::CSV_XS does know the difference between NULL/undef and empty strings. This will show when using always_quote => 1:
my $csv = Text::CSV_XS->new ({ always_quote => 1});
$csv->combine ("", 1, undef, "bar");
print $csv->string, "\r\n";
Will result in:
"","1",,"bar"
Note the missing quotes for the undef entry
If requested, I can consider adding an option to do the reverse also: when always_quoted is true, return empty columns as undef in the $csv->fields call.
|
|---|