On Thu, 7 Jun 2001, Peter Cornelius wrote: > use Benchmark; > opendir (DH, ".") or die; > timethese(50000, { > 'Randals' => q{my @result = <*.jpg>}, > 'variations' => q{my @result = grep /\.jpg$/i, readdir DH} > }); > closedir(DH) This only reads the directory in once for the 'variations' subroutine, as once the files are pulled in by readdir(), it returns immediatly. -- Ian
- Re: directory listing to array Peter Scott
- Re: directory listing to array Richard Hulse
- Re: directory listing to arra... iansmith
- Re: directory listing to arra... Randal L. Schwartz
- Re: directory listing to arra... iansmith
- Re: directory listing to array Michael Fowler
- RE: directory listing to array Andrew Nelson
- RE: directory listing to array Peter Cornelius
- RE: directory listing to array Richard Hulse
- RE: directory listing to array Peter Cornelius
- RE: directory listing to array iansmith
- RE: directory listing to array Peter Cornelius