in reply to CSV SPLIT
Sadly I had a case a couple years ago where the data had commas and quotes and probably other characters (possibly embedded cr/lf in a file which split lines and had continued on the next line markers and probably quoting inconsistencies and other weird stuff) and as a result the various Text::CSV variations did not work and I do not think I figured out what the problem was. I do not remember if the code crashed or just returned the wrong result. I ended up writing a pure perl routine (mostly brute force things but also used index and substr optimizations) to do the split and the problem was solved (with a fair amount of pain). it also seems to work handling csv files from Excel Worksheets (at least the ones I work with). I guess the lesson (for me at least) is that sometimes you have to grow your own solution.
I may have tried other splitting routines that were suggested at various sites without any luck - I just cannot remember.
maybe someday I will go back to the code and retry the processing with the Text::CSV code to see what the problem is so that (maybe) the Text::CSV code can be fixed. at that time I may include my code. I check these things I respond to periodically (not daily - more like every couple weeks) so if someone expresses some interest I may post the code I used before I retest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CSV SPLIT
by Anonymous Monk on Nov 04, 2014 at 16:35 UTC | |
by Anonymous Monk on Nov 04, 2014 at 22:01 UTC |