|
|
| There's more than one way to do things | |
| PerlMonks |
(MeowChow) Re: -d fails outside the current working directoryby MeowChow (Vicar) |
| on Jun 05, 2002 at 05:30 UTC ( [id://171772]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
As you see, readdir returns the unqualified names of the directory entries, but -d operates on them within the context of the current working directory, which is a recipe for failure. You should either change your cwd (not really recommended), or prepend the filenames with the relative/absolute path, as in:
MeowChow s aamecha.s a..a\u$&owag.print
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||