101 reputation
1
bio website blog.urth.org
location United States
age 41
visits member for 4 years, 3 months
seen Aug 27 at 20:40

Nov
22
awarded  Supporter
Jun
9
comment Should we hire someone who writes C in Perl?
The only correct answer for parsing CSV in Perl is to use a module. CSV is nasty, and it's easy to make little mistakes. Let someone else deal with it (they already have).
Jun
9
comment Should we hire someone who writes C in Perl?
Konrad, you're just wrong. Properly parsing CSV requires keeping track of the parse state as you go (am I in a quoted field, did I just see an escape). That sort of stuff makes for messy or (near-)impossible regexes. I say near-impossible because Perl does in fact have features for maintaining state inside regexes. Nonetheless, the proper way to parse CSV in Perl is to do it a character at a time. That said, I've asked similar questions in an interview, and by far the best answer is "I would use Text::CSV(_XS) from CPAN."