Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: Trying to find missing closing quotes in CSV

by Tux (Abbot)
on Sep 17, 2013 at 09:00 UTC ( #1054408=note: print w/replies, xml ) Need Help??

in reply to Re: Trying to find missing closing quotes in CSV
in thread Trying to find missing closing quotes in CSV

Bad idea. In perfectly correct CSV, it is possible to have odd number of " perl line in many different ways. This is valid CSV (all lines with " have an odd number of "):

$ cat test.csv 1,"2,","3"04" 2,"newline there -> and more text for row 2",There 3,,Bah $ csv-check test.csv Checked test.csv with csv-check 1.5 using Text::CSV_XS 1.01 OK: rows: 3, columns: 3 sep = <,>, quo = <">, bin = <1>, eol = <"\n"> $

Parsing CSV with regular expressions and/or on perl default readline method is a dangerous path to walk.

Enjoy, Have FUN! H.Merijn

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054408]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-02-19 12:52 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (264 votes). Check out past polls.