in reply to perl 1-liner to join a list?

perl -le 'my @a = <>; chomp @a; print join ",", @a' file

BTW, That's a useless use of cat.

Update: Here's an alternative to avoid reading the whole file into memory:

perl -e '{ $_=<>; chomp; print; last if eof(); print ","; redo }; prin +t $/'

-sauoq
"My two cents aren't worth a dime.";