P
Patrick
Hello,
In an application I write in Perl, I must count the total number of
files (not directories) in a complete tree.
What is the most efficient way to do it ?
My current code is :
use File::Recurse;
my $nb = 0;
recurse { -f && $nb++ } $dir;
With this code, I can scan 10,000 files in 15 seconds.
I want to know if it exists a best way (= quicker) to do it ?
Thanks for your help.
Patrick
In an application I write in Perl, I must count the total number of
files (not directories) in a complete tree.
What is the most efficient way to do it ?
My current code is :
use File::Recurse;
my $nb = 0;
recurse { -f && $nb++ } $dir;
With this code, I can scan 10,000 files in 15 seconds.
I want to know if it exists a best way (= quicker) to do it ?
Thanks for your help.
Patrick