find({ wanted => sub { my ($dev,$ino,$mode,$nlink,$uid,$gid); my $depth = tr!/!!; # count slashes to get depth return if (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && (int(-M _) > $maxage) or (($depth < 3) or ($depth > 3)) ; if ($_ =~ /threads\.html\z/s) { push @files, $_; } }, no_chdir => 1 }, '.', $MAXHITS );