[Chicago-talk] Simple csv text parsing question

Mike Ferrari mikeferrari8 at yahoo.com
Wed Apr 9 13:47:22 PDT 2008


I was playing with Text::CSV_XS .. and got lost.. seriously.. although it
did claim it could handle "embedded newlines" which i now know is the term
for the thing thats killing me..  i couldn't get it to handle embedded
newlines even in binary mode.
I will play with Text::xSV tonight to see what i come up with..

With all the different "csv" parsing modules out there.. you would think
there would be a push for one big/good one to use with good docs and
examples... Instead of 10 different ones you load on special cases with
mediocre docs and examples..


> On Wed, Apr 9, 2008 at 3:37 PM, Andrew Rodland <arodland at comcast.net>
> wrote:
>
> > 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.
> >
> > Andrew
> > _______________________________________________
> > Chicago-talk mailing list
> > Chicago-talk at pm.org
> > http://mail.pm.org/mailman/listinfo/chicago-talk
> >
>
>
>
> --
> /dev/mike0
>
> http://www.mikeferrari.com
>



-- 
/dev/mike0

http://www.mikeferrari.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20080409/041384df/attachment.html 


More information about the Chicago-talk mailing list