|
|
| more useful options | |
| PerlMonks |
mkdir usageby skyworld_chen (Acolyte) |
| on Dec 21, 2012 at 01:47 UTC ( #1009828=perlquestion: print w/ replies, xml ) | Need Help?? |
|
skyworld_chen has asked for the
wisdom of the Perl Monks concerning the following question:
Hi,
I would like to test if a directory exists. If not, mkdir it. I wrote code like this:
I guess if the directory exist, there would prompt nothing. But it is interesting that the linux prompts "Can't generate abc: File exists". Can anybody help me to understand why the code still want to mkdir even if (! -d abc) implies false? thanks.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||