http://qs321.pair.com?node_id=106065


in reply to Avoiding making a directory that already exists

Actually, mkpath does the testing for you and will not try to create a directory that is already there. I would not bother to test.
From Path.pm:

sub mkpath { my($paths, $verbose, $mode) = @_; ... foreach $path (@$paths) { ... next if -d $path; ... my $parent = File::Basename::dirname($path); unless (-d $parent or $path eq $parent) { push(@created,mkpath($parent, $verbose, $mode)); } ...
Rudif