use File::Find; finddepth (\&RetrieveAll, "c:\\fpx"); sub RetrieveAll { push (@list,$_,"\n"); }