5 ms·
If you can't write a correct (according to RFC 4180) CSV parser in 15 lines of Perl then you're not a Real Programmer! (Yes, I understand that not all CSV file
by bloak 6y ago
If you can't write a correct (according to RFC 4180) CSV parser in 15 lines of Perl then you're not a Real Programmer!
(Yes, I understand that not all CSV files in the wild are correct according to RFC 4180. Yes, I also understand that only grey-beard loons still use Perl.)
The strangest thing about CSV, I think, is that if there's only one field per record and the file ends with a CRLF then you can't tell whether there's a final record containing an empty field following that CRLF. It's probably best to assume there isn't.
- nmz 6y ago15? damn, that's 10 lines less than my awk csv parser. oh well...