"be consistent" | |
PerlMonks |
Re: Text::CSV_XS issueby WoodyWeaver (Monk) |
on Jan 09, 2008 at 21:07 UTC ( [id://661505]=note: print w/replies, xml ) | Need Help?? |
> Why oh Why would Text::CSV do this? I did nothing different with this string?
Because its a feature? Look at the parameters on new:
quote_char The char used for quoting fields containing blanks, by default the double quote character ("). A value of undef suppresses quote chars. (For simple cases only).The CSV specification, as defined in RFC4180, is somewhat contentious, particularly with regard to quoting and spaces. It appears that your code is doing something "reasonable", and not quoting when the param doesn't contain a space, and quoting when it does.
In Section
Seekers of Perl Wisdom
|
|