in reply to Re^3: how to convert new line to ","
in thread how to convert new line to ","

The working line would be
perl -00pe 'chomp; s/\n/,/g; s/$/\n/' data.txt
and, yes, I tested it :-) the chomp yanks the last \n\n, so you must put one again at the end b4 printing.
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^5: how to convert new line to ","
by repellent (Priest) on Jul 27, 2008 at 02:35 UTC
    We can get around chomping with the "-l" argument.