A good module that does similar things is
File::Find. If you get really stuck, you might take a look at its guts. As to your two questions:
- There shouldn't be any file system level differences... it's more likely you've accidentally used an option which isn't supported on ActiveState's interpreter for 9x. (fork() and alarm() come to mind)
- The -X test will help you here. Specifically:
if (-d $filename) {
print "$filename is a directory.\n";
} else {
print "$filename is a file. Skipping...\n";
}