"be consistent" | |
PerlMonks |
Re: Re: CSV and regex mixupsby Tomte (Priest) |
on Jul 02, 2003 at 23:43 UTC ( [id://271012]=note: print w/replies, xml ) | Need Help?? |
Building on what Zaxo said about correct CSV quoting of double-quotes, you might as well filter the CSV-file before you process it with Text::CSV. A little test: The flaw, as you might've already seen, is that the look-ahead/behind assertions recognize the start and end of the line as 'not comma', and therefore substitute the leading and the tailing double-quote too. If your data is otherwise well-formed, all you have to do, is add a second filter:
regards, Hlade's Law:
If you have a difficult task, give it to a lazy person --
In Section
Seekers of Perl Wisdom
|
|