in reply to Re^3: how to convert new line to ","
in thread how to convert new line to ","
and, yes, I tested it :-) the chomp yanks the last \n\n, so you must put one again at the end b4 printing.perl -00pe 'chomp; s/\n/,/g; s/$/\n/' data.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: how to convert new line to ","
by repellent (Priest) on Jul 27, 2008 at 02:35 UTC |