in reply to Problems creating sub's

I note, for those who might come across this node (and this is not meant to count as a rebuff to footpad -- I think it's good to think about why your code doesn't work, you usually (always?) learn something!) that if you want to exclude directories from being traversed by File::Find, you can set $File::Find::prune to 1 if the current directory matches the exclusion pattern.

Below is untested ...

# nifty trick -- make a hash to ease the lookup in the findit sub my %excludeit; # now set the keys of the hash # (== the members of your excluded directories array) # to have values of 1 @excludeit {@exclude_dirs} = (1) x @exclude_dirs; # this would be the subroutine used by File::Find sub findit { $File::Find::prune = 1 if $excludeit{$_}; # .. }

Philosophy can be made out of anything. Or less -- Jerry A. Fodor