in reply to perl 1-liner to join a list?
?perl -e "chomp(@F=<>); print join',',@F" file
- or do it all with command line args and have no program:perl -pe "tr/\n/,/" file
If you don't want a trailing comma:perl -l0054pe '' file
perl -pe "eof or tr/\n/,/" file
|
|---|