Well ok, it's not the exact thing but my original point was more "how the hell can it be so damn slow". When you look at perldoc -f readdir the grep sollution is what's suggested, eventhough it seems like a really bad idea.
A little mention of glob would be nice as it does the exact same thing but a hundred times quicker or so.