denzil_cactus has asked for the wisdom of the Perl Monks concerning the following question:
I am getting problem in checking if any directory exists my code is
here I want to put the flag if the directory exists then no need to mkdir again but I am getting the following errorunless(-d $dir) { `mkdir -p $dir`; }
even the directory exists.mkdir: cannot make directory: /usr/spool/uucppublic/sent/bki_prod: Fil +e exists (error 17) mkdir: cannot make directory: /usr/spool/uucppublic/sent/bki_prod: Fil +e exists (error 17)
suggest me if I am doing anything wrong here.
Thanks
|
|---|