my $error; mkdir $path or $error = $!; unless (-d $path) { die "Cannot create directory '$path': $error"; }
That should avoid race conditions in directory creation.
In reply to Re: Directory creation in Perl using mkdir
by moritz
in thread Directory creation in Perl using mkdir
by sselva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |