I downvoted this. It creates non-portable code by reinventing a fine portable wheel, and it doesn't pay attention to symlinks, and will therefore recurse infinitely if a symlink happens to point to an upper directory, and it has the common bug that ignores the files dot-newline and dot-dot-newline.
Please, please, stop showing how to "cargo cult" recursive directory until you have studied in detail why every part of File::Find is in there. Besides
the three bugs I just mentioned, there's probably even bugs I can't see at the moment!
-- Randal L. Schwartz, Perl hacker