in reply to Reading escaped data from a CSV

While Text::CSV_XS is best for production use, it won't do you much good as an example of parsing CSV unless you want to look at the C code in it. For pure perl, you might want to look at AnyData::Format::CSV which uses a modifed Friedl regex to support variable delimiters, escape characters, etc. But note: it does not (yet) support embedded newlines unless something other than a single newline is used as a record separator.

Replies are listed 'Best First'.
Re: Re: Reading escaped data from a CSV
by tilly (Archbishop) on Nov 15, 2003 at 13:39 UTC
    A better pure Perl example to get ideas on how to parse is probably Text::xSV. It does handle embedded newlines. Plus the strategy of using /g matches and pos is massively easier to get your head around than big and nasty regular expressions. (And extends to more complex problems.)