in reply to Re: Re: How do I parse a CSV that can contain newlines in fields?
in thread How do I parse a CSV that can contain newlines in fields?

To elaborate: Text::CSV can do CSV parsing, but you'll need to make sure you send it the appropriate fields (using the input separator above, or whatever trick you prefer). Another piece of advice about Text::CSV: The docs mention that a certain range of characters is allowed. If a character outside that range is in the data, it will quietly not work.
  • Comment on Re(3): How do I parse a CSV that can contain newlines in fields?

Replies are listed 'Best First'.
Re: Re(3): How do I parse a CSV that can contain newlines in fields?
by motobói (Beadle) on Dec 14, 2009 at 19:03 UTC

    You must put Text::CSV in binary mode:

    my $csv = Text::CSV->new( {binary => 1, eol = $/ } );