in reply to readdir fails?

My understanding (limited as it is) says that readdir is like reading and array and you need a loop in there to get anything past the . or .. or anything else. Try something like this.
opendir(DIR, $dirname) || die "Horrible Death"; while(defined($file=readdir(DIR)) { print $file, "\n"; } closedir(DIR);
This gets you through all the files in the directory.

Hope that helps out.

webadept.net