|We don't bite newbies here... much|
perl 1-liner to join a list?by bfdi533 (Pilgrim)
|on Nov 11, 2003 at 21:15 UTC||Need Help??|
bfdi533 has asked for the
wisdom of the Perl Monks concerning the following question:
I am looking for a perl 1-liner to join a list of items from stdin to stdout joined with a comma. I have searched the monastary and cannot find anything on this.
Say my list looks like this and is in a file called 'file':
and I want it to look like this:
I have tried:
This does not produce any output at all.
I must be missing something simple here.