Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Re: Writing a CSV Parser/Printer

by Anonymous Monk
on Jun 26, 2003 at 07:42 UTC ( [id://269144]=note: print w/replies, xml ) Need Help??


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 :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-06-20 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.