use strict; use File::Find; my $startDir = '/mypathhere'; unless (-d $startDir) { die "Directory '$startDir' is not a Directory.\n"; } find(\&processSub, $startDir); sub processSub { if(-d $_) { #I DONT WANT TO SEARCH IN 'dirOne' and 'dirTwo' and 'dirThree' $File::find::prune = '/dirOne', '/dirTwo', 'dirThree'; print "$File::Find::name\n"; } }