Don't ask to ask, just ask | |
PerlMonks |
Re: Quickly Find Files with Wildcard?by linuxer (Curate) |
on Mar 23, 2009 at 01:21 UTC ( [id://752466]=note: print w/replies, xml ) | Need Help?? |
Just some thoughts to this topic. Did no testing or benchmarking. So all of this could be nonsense ;o) How many entries are read? Maybe it is a speedup if you grep for plain files when reading from the directory (so you have less entries in @a which are checked afterwards). This maybe only makes sense, if there are much more directories than files.
You could even check that hash value inside the grep:
Did you try glob() instead of readir? Don't know if there is a big difference between those implementations...
Did you try the linux
I think for a more detailed answer, please give more information... Otherwise it's up to you to find a solution... Update: fixed file/find typo
In Section
Seekers of Perl Wisdom
|
|