Perl: the Markov chain saw | |
PerlMonks |
Re: greater efficiency required (ls, glob, or readdir?)by broomduster (Priest) |
on Aug 27, 2008 at 19:28 UTC ( [id://707269]=note: print w/replies, xml ) | Need Help?? |
If the directory is large and you want to do globbing of file names, then ls can be a bad idea. From the shell:
You wouldn't actually do this to get the full directory listing, of course, but if the list of something*.whatever files that you want is too long, you're still hosed. In that case, you want a readdir / grep combo or glob (which doesn't suffer the same limitation as ls).
In Section
Seekers of Perl Wisdom
|
|