Of course using the likes of mkpath from File::Path is probably a better idea.use strict; use Cwd; use File::Spec; my($dir,$dest) = @ARGV; my $d = defined $dest ? $dest : cwd(); ## don't die incase intermediate dirs exist $d = File::Spec->catdir($d, $_) and not -d $d and mkdir($d) for File::Spec->splitdir($dir);
_________
broquaint
In reply to Re: recursive mkdir
by broquaint
in thread recursive mkdir
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |