in reply to cloning a directory tree
This example clones a directory tree:
Of course, this code could be tightened up quite a bit.use File::Flat; use File::List; my $search = new File::List("/usr/local/man"); $search->show_only_dirs(); my @dirs = @{ $search->find(".*") }; foreach my $dirname (@dirs){ File::Flat->makeDirectory("/copy".$dirname); }
It should work perfectly the first time! - toma
|
|---|