Nelly has asked for the wisdom of the Perl Monks concerning the following question:

<Hello Everybody,>

<I'm getting from the input destination path.> <How can I create the whole path if some directories in> <this path don't exist?>

<Please help me.>

Replies are listed 'Best First'.
Re: Making directories from path
by Corion (Patriarch) on Apr 14, 2004 at 12:54 UTC

    Take a look at File::Path, especially the mkpath routine.

    use strict; use File::Path; my $directory = '/tmp/some/path'; mkpath($directory);
      Thank You very very much!!!!!!!!! You have solved my problem!!!!!!!!!
Re: Making directories from path
by b10m (Vicar) on Apr 14, 2004 at 13:10 UTC
Re: Making directories from path
by Abigail-II (Bishop) on Apr 14, 2004 at 13:54 UTC
    I'd use system mkdir => -p => $path;. There's a module that can do this as well, but I can never remember what's it called.

    Abigail