You could also use -d on the actual name of the directory to see if it
exists before you try to create it.
my $dir="foo";
mkdir 'foo', 0744 unless (-d $dir);
HTH
-dave
On Thu, 16 Aug 2001 14:20:34 -0500, David Simcik wrote:
>Hey folks,
> This would seem to be a trivial thing, but I can'
Original Message-
From: David Simcik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 12:21
To: Perl Beginners
Subject: Checking for Directory Existence
Hey folks,
This would seem to be a trivial thing, but I can't find a great
answer
anywhere for it. I want to do a mkdir
Hey folks,
This would seem to be a trivial thing, but I can't find a great answer
anywhere for it. I want to do a mkdir, but before I do, I want to confirm
that the dir I'm about to make doesn't already exist.
Would the -X operators (particularily -e) work with DIRHANDLES??? That would
ce