in reply to Re: Re: Re: Writing a CSV Parser/Printer
in thread Writing a CSV Parser/Printer

Thanks for the excellent explanation :)

With regards to the error line numbers: there aren't any errors anymore - it just doesn't produce the desired results. I have a feeling it's quite a ways away as well - your approach is far clearer.

One question about the split if it's fed data like:

"csv", "csv\"x, xx", "trall\ala"

It will choke on the second entry. How would I go about avoiding this? I could use something like split/","/; which would make problems far less likely, but is there a better way? Some sort of notation for when it's inside the field?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Writing a CSV Parser/Printer
by Skeeve (Parson) on Jun 26, 2003 at 08:07 UTC
    Okay. That one isn't easy ;-)

    I have to admit that I have no good solution at hand.

    Maybe a search here will help.

    BTW: Why don't you register here. It's far more easy to recognize you if you're no longer Anonymous Monk. It just costs you some time...

      No problem - I got Text::CSV to work with BrowserUk's help, and since writing a parser is rather tedious, error-prone work, I'll probably leave that for another day :)

      Thanks for the help :)