in reply to Faster searching

I assume you are searching for filenames and not the content of the files?

Have you tried File::Find?

our @filelist = (); our $fdir = "/usr/blah" find(\&wanted, $fdir); die " cannot get file list: $!" unless(@filelist>0); #assuming the directory exists, @filelist now has all files in blah in +cluding subdirs. sub wanted { my $thisfile = $File::Find::name; push(@filelist, $thisfile) }
See the doc for how to search using more complex criteria