in reply to set lineendings in Text::xSV

At the perl level (I don't know Text::xSV) your RE could be prettier with:s/\n/\r\n/although I have to ask why you wish to add the \r?

Replies are listed 'Best First'.
Re^2: set lineendings in Text::xSV
by borisz (Canon) on Apr 07, 2006 at 10:41 UTC
    CRLF is a requirement for the csv.
    Boris
      If you are running this on Windows then it will insert the \r for you (unless the fh has binmode set). If running it on another platform then you can try setting $\ to "\r\n".
        Text::CSV_XS (if you can use it) can take either line endings automatically.
        the hardest line to type correctly is: stty erase ^H