You have the name of a directory in the scalar $newDir, and then you write -d {newDir}. What do you expect {newDir} to do? What if you write -d $newDir instead?
Improve your skills with Modern Perl: the free book.
In reply to Re: -e fails when file is proven to exist
by chromatic
in thread -e fails when file is proven to exist
by zemplen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |