Updated: October 6th, 2009
No matter what programming language you use, there comes a time when you need to search for a file somewhere on the file system. Here, I want to talk about accomplishing this task in Perl. There are many ways of doing so, most of them boring, but I want to discuss the fun and elegant way – using File::Find::Rule.
Let me briefly discuss some of the other methods first.
Using glob() (or <>, TODO verify) you can find files in a single directory, using only the limited shell wildcard support. For example,
my @files = glob("tmp*");