in reply to How to efficiently parse "ls -a"?

Something a bit more high level than readdir and stat to play with, Path::Class

perl -MPath::Class=dir -le 'print join $/, sort(dir(".")->children)'