my @cfiles = glob('*.c'); print join("\n",@cfiles),"\n"; #### $ ls test_ test_data_rw.C test_exitcode test_exitcode.c test_rw_bindata.c $ perl -e ' >my @cfiles = glob("*.c"); # used "'s for CLI input. >print join("\n",@cfiles),"\n"; >' test_exitcode.c test_rw_bindata.c