Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Avoiding making a directory that already exists

by Rudif (Hermit)
on Aug 19, 2001 at 23:38 UTC ( [id://106065]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://106065]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-28 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found