sub wanted { # Skip the rest of the current directory. return if $File::Find::prune; if (($fileage <= $modtime) && (-d $_)) { #check file age if (($fileage <= $modtime) && (-f $_)){ #..do whatever } } else { # Do not descend further down the tree. $File::Find::prune = 1; # Skip this file. return; } }