cat data.txt | perl -00pe 's/\\n/,/g' [download]
cat data.txt | perl -l -00pe 's/\n/,/g' [download]
In reply to Re^2: how to convert new line to "," by repellent in thread how to convert new line to "," by bh_perl