http://www.perlmonks.org?node_id=185738


in reply to Need help with creating a filename only array

File::Find will repay a little effort in learning to use it, as it will let you do pretty much whatever you want along these lines. If I understood your question, I think this does the particular thing you want at present:
use File::Find; sub myprint {print "$_\n" unless -d($_)} # i.e. print anything that's not a directory find(\&myprint,'/your/directory');


§ George Sherston