On Jan 22, 2005, at 2:06 PM, Rhet Turnbull wrote:
You might want to look at Text::xSV ( http://search.cpan.org/~tilly/Text-xSV-0.13/ ). It handles embedded linefeeds.
--Rhet
I wrote Text::RecordParser after playing with Text::xSV and finding some of it not quite to my liking. It should work well for you:
http://search.cpan.org/~kclark/Text-RecordParser-0.08/
ky
On Sat, 22 Jan 2005 10:43:59 -0600, Eric Wilhelm <[EMAIL PROTECTED]> wrote:Hi,
I've written some code before which uses the CSV.pm module (has this never appeared on CPAN?) But had to step-through the number of quotes and read-in some extra lines to get a full record (where linefeeds are embedded in fields.)
That was a terribly memory hog, and entangled with some task-specific code (but I'm a better programmer now than I was two years ago.) So, I thought I would take a look at CPAN before I try to round-off this square wheel. From the looks of it, there isn't anything there for this.
I looked at Text::CSV_XS and messed with Text::CSV::Simple, but both of these seem to want a record to be only on one line.
I couldn't get AnyData::Format::CSV to work using either form of the examples (could be that it isn't dying properly on errors?)
Tie::Handle::CSV looked promising, but also chokes on the embedded linefeeds.
Any suggestions? Did I miss something? I would be happy to subclass one of these and rewrite my step-over-linefeeds code into it, but I can't help but think it must have been done before.
Thanks, Eric -- "Matter will be damaged in direct proportion to its value." --Murphy's Constant