#!/usr/bin/perl use strict; use warnings; use File::Find; # lists all "normal files" which are both readable and # writeable underneath "C:/test" my @found; find( { wanted => \&get_files }, "C:/test" ); print "$_\n" for @found; sub get_files { return unless ( -f $File::Find::name and -r _ and -w _); push @found, $File::Find::name; } __END__ printed on my machine: Note that the sub directory of "subdirtest" is skipped. A directory name fails the -f test. C:/test/maur-1110.tiff C:/test/maur-1111.psd C:/test/TUMI-1354839054_alt1_.psd C:/test/subdirtest/docinbsubdir.txt C:/test/subdirtest/New Text Document.txt