Don't ask to ask, just ask | |
PerlMonks |
Re: Issue parsing CSV into hashes?by stephen (Priest) |
on Sep 21, 2010 at 18:02 UTC ( [id://861127]=note: print w/replies, xml ) | Need Help?? |
The parse is failing because of the quotation marks. From the manual: "Fields that contain a special character (comma, newline, or double quote), must be enclosed in double quotes."
Change your initialization to: and it should parse. Resetting 'sep_char' to ':' won't work, because that will make CSV split on ':' characters, and you want it to split on commas. I suspect that for what you're doing, you're not actually getting any value from Text::CSV_XS. I think you'd do better just to use split(), but that's up to you. stephen
In Section
Seekers of Perl Wisdom
|
|