Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hey,
The documentation states: "The make_path function creates the given directories if they don't exists before.
Still,
keeps on giving me plenty of "Couldn't create tmp dir: File exists".make_path $path or die "Couldn't create tmp dir: $!\n";
I even tried surrounding the whole thing with if (!-e $path) { ... }, but of course that doesn't help in case of a race condition, since several instances of the script are forked off in my code. But shouldn't make_path deal with this by default?
I need to sit down and work through the "Error handling" part because I don't understand it yet, but will that help at all in my case, with several instances of the script all trying to create the directory before writing to it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with make_path in File::Path
by MidLifeXis (Monsignor) on Jul 20, 2012 at 16:24 UTC | |
by Anonymous Monk on Jul 20, 2012 at 17:20 UTC | |
|
Re: Problem with make_path in File::Path
by toolic (Bishop) on Jul 20, 2012 at 17:14 UTC |