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
In reply to Re: cloning a directory tree
by toma
in thread cloning a directory tree
by zentara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |