Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Joining lists on the command line



On Fri, Sep 11, 2009 at 5:09 PM, Ian Barwick <barwick@example.com> wrote:

ls | perl -e 'while(<>) { chomp; push @l, $_ }; print join(",",@l);'


but you forgot perl's command line args:

ls | perl -lne 'END { print join ",", @w } push @w, $_'


=================================
Andrew Grover - grover@example.com
International Systems Research Co.
http://www.isr.co.jp
=================================

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links