in reply to opendir slower than ls on large dirs?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: opendir slower than ls on large dirs?
by Anonymous Monk on Jul 06, 2005 at 14:22 UTC |