Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: Parsing user input into CSV table

by lwicks (Friar)
on Apr 14, 2004 at 12:23 UTC ( [id://345016]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Parsing user input into CSV table
in thread Parsing user input into CSV table

Further investigation shows that the problem is in fact not commas or html tags etc. Rather newlines.

So whats the "help the noobie" suggestion for stripping the newline characters from the scaler?

Lance

Kia Kaha, Kia Toa, Kia Manawanui!
Be Strong, Be Brave, Be perservering!
  • Comment on Re: Re: Re: Parsing user input into CSV table

Replies are listed 'Best First'.
Re: Re: Re: Re: Parsing user input into CSV table
by William G. Davis (Friar) on Apr 14, 2004 at 18:30 UTC

    The "help the noobie" suggestion is to use some already-existing CSV module and let it handle this for you :) Unfortunately, Text::CSV doesn't handle newlines at all. It *could* escape them, but for some reason, it doesn't--it just silently fails when passed newlines.

    Our fellow Monk Tilly has written Text::xSV, which offers a much better interface to CSV than Text::CSV does. It can handle commas and newlines, and provides more file-oriented routines to store the resulting CSV and load it later on: http://search.cpan.org/dist/Text-xSV. Great solution.

Re: Re: Re: Re: Parsing user input into CSV table
by lwicks (Friar) on Apr 14, 2004 at 12:58 UTC
    I think I found the answer here 84423
    Opinions?

    Kia Kaha, Kia Toa, Kia Manawanui!
    Be Strong, Be Brave, Be perservering!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-23 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found