perl -lpe '$\=(eof)?$/:","' file
Update: or this
perl -l54pe '$\=$/if+eof' file
--
John.
In reply to Re: perl 1-liner to join a list?
by jmcnamara
in thread perl 1-liner to join a list?
by bfdi533
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |