|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: Perl sample source code; die() in a CGI; Couldn't determine the video directory?; ImageMagick slowness extracting EXIF information from JPEG files; Recursively make directories in perl; Welcome to my personal perl help desk
posted at: 23:04 | path: /perl | permanent link to this entry