in reply to Re: is there a file/directory?
in thread is there a file/directory?
To get around that, you can use sysopen(), which is atomic, which means that the check to see if the file is there, and the opening of the file, are done instantaneously.
Re: Re: is there a file/directory? With mkdir(), you don't have that problem:
if (!mkdir($dir, $perm) and $! =~ /^File exists/) { warn "($dir already exists)"; } elsif ($! =~ /^Permission denied/) { warn "(can't create $dir)"; } # ...
|
|---|