in reply to Who beats Text::CSV?
I prefer TAB separated files. You can *almost* always do $field =~ s/[\n\r\t]/ /g, join the fields with tabs, and output them. The need for TABS and NEWLINES in data fields is far rarer than commas so you loose a lot of complexity as there is no need for quoting/parsing. On reading it is a simple split "\t" on a line and there are your fields - I dare say it does not get any faster.
Hand edits on TAB files can cause issues and by default the tab char is 'invisible' so a file can look OK after a hand edit but be broken. One advantage is that fields may line up (then again it does not take much diff in size and they won't). Tab sep files import into spreadsheets just as easily as CSV. As always YMMV.
If you *need* more speed and want to use CSV look to a C/XS based module. Text::CSV_XS or similar.
cheers
tachyon
|
|---|