|A more efficient way of getting a directory listing?|
You might have noticed no comments are visible yet. I've actually got four to publish, but I'm just finishing off the display side of the system now (there was an afternoon nap that got in the way of that). Anyways, my current problem is that:
open FH, "ls /home/mikal/blog-comments/$path/$filename/ 2> /dev/null |" or die "Couldn't get a list of files";
Is terribly inefficient and slow. Is there a faster way of getting a listing of a directory's contents in perl?
Tags for this post: perl directory listing slow
Related posts: Recursively make directories in perl; Solving a slow app startup on MacOS; Perl sample source code; die() in a CGI; Welcome to my personal perl help desk; On syncing with Google Contacts
posted at: 23:04 | path: /perl | permanent link to this entry