[Chicago-talk] Simple csv text parsing question
arodland at comcast.net
Wed Apr 9 13:37:33 PDT 2008
On Wednesday 09 April 2008 01:44:46 pm Mike Ferrari wrote:
> It just so happens that some of the data has a CRLF smack in the middle
> I am using Text::CSV for the first time and am liking the power to deal
> with the commas and quotes and stuff.. but i am having problems with the
> CRLF in the middle of the data.
> The perldoc page says if you run into non ASCII characters use binary
> mode.. but the CRLF isn't non ASCII.
> Whats the most normal/easiest way to deal with CRLF in the data without
> screwing up the normal end of line? I need to sanitize the data somehow and
> am drawing a blank.
Try Text::xSV, it's less blatantly line-based than Text::CSV, and it copes
with that sort of thing better. Besides, I think the interface is more sane.
More information about the Chicago-talk