jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:
On occasions this created false directories on the occasions that $scalar wasn't available. I used a conditional to prevent this:$dir_name = "/path/$scalar"; mkdir $dir_name, 0777 unless -d $dir_name;
However I see that phantom directories are still being created (with the name $scalar). On trying to open the directories I get "server response: no such file".if ($scalar) { $dir_name = "/path/$scalar"; mkdir $dir_name, 0777 unless -d $dir_name; } else { die "Sorry, no scalar value available: $!" }
How can I prevent this happening an what can I do to remove these 'phantom' files?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Phantom directories created using mkdir
by jasonk (Parson) on Feb 19, 2003 at 16:34 UTC | |
by jonnyfolk (Vicar) on Feb 19, 2003 at 17:01 UTC | |
|
Re: Phantom directories created using mkdir
by CountZero (Bishop) on Feb 19, 2003 at 16:32 UTC | |
by jonnyfolk (Vicar) on Feb 19, 2003 at 16:52 UTC | |
|
Re: Phantom directories created using mkdir
by OM_Zen (Scribe) on Feb 19, 2003 at 16:39 UTC | |
by jonnyfolk (Vicar) on Feb 19, 2003 at 17:08 UTC |