in reply to Illegal characters in windows filenames?

If you have (or can get and use) a windows port of the unix "find", it might be interesting to see what happens when you run that tool on the Mac directories (save its output to a file), and then compare that to the output you'd get by just doing the equivalent thing in perl:
... my @dircontents = $dir->read(); print join "\n", @dircontents, ''; ...
I'm wondering what version of Perl you're using, and whether it might be having a problem with file names containing characters with byte values greater than 127. The "0x3F" character is a just question mark, no matter where you are, and I could imagine some ill-conceived "DWIM-ery" going on that might be based on not expecting characters above 127 in file names, or putting a "?" in place of such characters because there's nothing specified in your code about how to interpret them as characters (e.g. what to map them to in utf8). I'm not well acquainted with these issues on a Windows box, but I have seen, eg, MacArabic characters used in file names (from an Arabic newspaper cd-rom). Scary stuff. If your Perl release has a "perlunicode" man page, you might want to read that...