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.
In reply to Re: Re: Re: Re: Parsing user input into CSV table
by William G. Davis
in thread Parsing user input into CSV table
by lwicks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |