$ perl -Mstrict -e 'my @out =qx{ls $ENV{HOME}/tmp}; chomp @out; print join (", " , @out), "\n";' a.out, test.c, test.dat, test.pl