in reply to opendir slower than ls on large dirs?
In case of foo() you just slurp the output of ls into a single variable, in both other cases you get arrays as result. You compare apples to pears.
In Section
Seekers of Perl Wisdom
in reply to opendir slower than ls on large dirs?