Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
There's more than one way to do things
 
PerlMonks  

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

by jorg (Friar)
on Apr 03, 2001 at 10:45 UTC ( [id://69259]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to 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?

Have a look at Text::CSV

Jorg

"Do or do not, there is no try" -- Yoda
  • Comment on Re: Re: How do I parse a CSV that can contain newlines in fields?

Replies are listed 'Best First'.
Re(3): How do I parse a CSV that can contain newlines in fields?
by swiftone (Curate) on Apr 03, 2001 at 13:48 UTC
    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.

      You must put Text::CSV in binary mode:

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://69259]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.