I'm not exactly sure how it flaws your benchmark, but that's definitely not going to do what you intend it to do. You're looking for any filename that contains "somefil" followed by zero or more letter e. Do you want that, or do you instead want: /^somefile/?my $file = 'somefile*'; ... my (@files) = (grep (/$file/, readdir(F)));
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: opendir slower than ls on large dirs?
by merlyn
in thread opendir slower than ls on large dirs?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |