File::Spec if you are working cross platform. then "mkdir $path"
On 5/22/06, Toby Stuart <[EMAIL PROTECTED]> wrote:
> -----Original Message----- > From: SkyBlueshoes [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 23 May 2006 12:38 PM > To: beginners@perl.org > Subject: Create Directories > > > Another stupid question, search.cpan.org doesn't like me, lol: > > Which module is best for creating a directory and all directories in > between. > > Ex: > > I want to create the directory : \dir1\dir2\dir3\targetdirectory > but none of the preceding numbered directories exist... > > > Sky Blueshoes > use strict; use warnings; use File::Path; eval { mkpath("c:\\a\\test\\path") }; if ($@) { print "Couldn't create: $@"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
-- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>