http://qs1969.pair.com?node_id=472399


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.