laziness, impatience, and hubris | |
PerlMonks |
Re: Comparison of the parsing features of CSV (and xSV) modulesby Tux (Canon) |
on May 08, 2007 at 13:37 UTC ( [id://614137]=note: print w/replies, xml ) | Need Help?? |
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. Enjoy, Have FUN! H.Merijn
In Section
Meditations
|
|