good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Glob and lstatby Anonymous Monk |
on Jul 28, 2012 at 02:58 UTC ( [id://984133]=note: print w/replies, xml ) | Need Help?? |
so why is perl wasting so many compute cycles getting that information? If the docs don't explain, Use The Source Luke http://perl5.git.perl.org/perl.git/tree/HEAD:/ext/File-Glob http://perl5.git.perl.org/perl.git/blob/HEAD:/ext/File-Glob/bsd_glob.c#l650
http://perl5.git.perl.org/perl.git/blob/HEAD:/ext/File-Glob/bsd_glob.c#l670 So in "$path/d[0-9]*/d[0-9]*" it needs to determine if d[0-9]* is a directory, so it needs to call stat Could parts of bsd_glob.c be optimized? Maybe These days I usually use File::Find::Rule, but this glob converted is not as elegant
In Section
Seekers of Perl Wisdom
|
|