in reply to Doing it with command line switches

Not nearly as obfu, and non-Perl, but fewer keystrokes :)
ls -1|tr '\n' ,

Replies are listed 'Best First'.
Re^2: Doing it with command line switches
by JavaFan (Canon) on Dec 10, 2009 at 14:22 UTC
    Even shorter:
    ls -mw 100000
    assuming that 100000 chars is enough.
Re^2: Doing it with command line switches
by ambrus (Abbot) on Dec 11, 2009 at 16:09 UTC

    Note that tr \\n , is one character shorter than tr '\n' ,

Re^2: Doing it with command line switches
by Anonymous Monk on Dec 13, 2009 at 23:58 UTC
    That's cheating, don't forget perl -e 'open X, ">foo\nbar";'