"be consistent" | |
PerlMonks |
Long Directory Namesby markwild (Sexton) |
on Dec 12, 2000 at 09:02 UTC ( [id://46213]=perlquestion: print w/replies, xml ) | Need Help?? |
markwild has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Perlish People,
I know this is a problem that's been conquered many times before, but the answer, at present, eludes me. I'm working on a Win2k box with Activestate Perl 5.6. Disk is NTFS format. I need to process all of the files in a directory. The directory name is very long and has spaces in it. I have followed the recipes in the Cookbook, and they work as long as there are *no* spaces in the path. But when I have a path name like "d:\my documents\my other stuff\*.*" it fails. Specifically, here is my code: And the output I get is: The actual directory has this: However, if I replace the full path with ".\*.*", I get this: I can't seem to find anything on CPAN for this, though I know there must be something somewhere. FYI: I've also tried using opendir, as suggested in another article on this site. Is this a problem with Globbing, or with how the file names are stored in the list? Any random thoughts? Any specific ones? Much Thanks. --Mark
Back to
Seekers of Perl Wisdom
|
|