Hello All,
I've found lot's of info on how to check if a file exists but nothing
about checking if a directory exists. I've posted the relevant code
below along with 3 variations of how I "think" it might work. If
somebody could point to the one that is "correct" or knows of a better
way I'd appreciate the help. Thank you.
<CODE_SNIP>
use constant USER_PATH => '/home/~client/htdocs/clients/';
$path = USER_PATH . $personal_key;
## Is This Correct? ##
if (-e "$path") {
&get_on_with_it }
else { &errorMsg }
## Or This? ##
opendir(CLIENT, "$path") or die " &errorMsg ";
closedir(CLIENT);
&get_on_with_it
## Or Is It This? ##
if (-d $path) {
&get_on_with_it }
else { &errorMsg }
<!CODE_SNIP>
--
Best regards,
K.L. Hayes
mailto:[EMAIL PROTECTED]
+=====================================================+
+ "Only two things are infinite, the universe and +
+ human stupidity, and I'm not sure about the former."+
+ -- Albert Einstien +
+=====================================================+
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]