http://www.perlmonks.org?node_id=978226


in reply to Re^2: TEXT::CSV Error 2032
in thread TEXT::CSV Error 2032

Text::CSV_XS automatically deals with CR and/or NL in CSV streams/files.

Well the documentation (that I claim not to know :-P) says otherwise:

This means that fields can not contain newlines. If your data contains newlines embedded in fields, or characters above 0x7e (tilde), or binary data, you *must* set binary => 1 in the call to new (). To cover the widest range of parsing options, you will always want to set binary.

Still I haven't been able to reproduce the OP's error yet.

Cheers, Sören

Replies are listed 'Best First'.
Re^4: TEXT::CSV Error 2032
by Tux (Canon) on Jun 25, 2012 at 17:04 UTC

    The OP did add binary => 1 in the constructor, so that part of the doc is not applicable to this problem IMHO.

    Again sorry for the harsh tone in my first reply. Appreciate your help to people with questions.


    Enjoy, Have FUN! H.Merijn
Re^4: TEXT::CSV Error 2032
by endymion (Acolyte) on Jun 26, 2012 at 06:26 UTC
    False alarm . I have found the problem. Now it works. There were hidden ^M chars in the file. For other user, got this problem. With substitute s/^M//g I solved the error. Thanks Tux for the right direction.
Re^4: TEXT::CSV Error 2032
by endymion (Acolyte) on Jun 26, 2012 at 06:14 UTC
    Hello Monks, the chomp was not the problem :-(. I also tried to substitute the newlines. Very strange.