Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You probably won’t need recursive directory access for the
first few dozen hours of your Perl programming career. So rather than
distract you with the possibility of replacing all those ugly find scripts with Perl right now, we’ll simply
entice you by saying that Perl comes with a nice library called File::Find, which you can use for nifty
recursive directory processing. We’re also saying this to keep you from
writing your own routines, which everyone seems to want to do after
those first few dozen hours of programming, and then getting puzzled
about things like “local directory handles” and “how do I change my
directory back?”
If you are already using Unix find commands to get work done, you can convert them to Perl programs with the find2perl program that comes with Perl. You give it the same arguments that you use with find and it spits out the equivalent Perl program: