Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: CSV Parser, with and without encapsulation

by Tux (Canon)
on Oct 25, 2012 at 08:14 UTC ( [id://1000785]=note: print w/replies, xml ) Need Help??


in reply to CSV Parser, with and without encapsulation

The "best" is of course Text::CSV_XS :)

Text::CSV is just a wrapper over Text::CSV_XS and/or Text::CSV_PP.

If your CSV data is mixed and invalid, chances are that you might not find a combination of options that will work on all records, but a good start for what you describe would be something like:

my $csv = Text::CSV_XS->new ({ binary => 1, allow_loose_quotes => 1, escape_char => undef, auto_diag => 1, });

Please carefully read the manual for all allow_*** options.


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1000785]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-18 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found