I want to copy these directories so that the target directory looks like
this:

Target directory structure

SubDirAA
        combined directories
SubDirAB
        combined directories
SubDirAC
        combined directories
SubDirBC
        combined directories


How about this (or a variation for your specific needs)

#!/usr/bin/perl

use strict;
use warnings;
use File::Copy::Recursive qw(dircopy);

my $dira = 'foo';
my $dirb = 'bar';
my $target = 'baz';

dircopy($dira,$target) or die $!;
dircopy($dirb,$target) or die $!;

http://search.cpan.org/~dmuey/File-Copy-Recursive-0.05/Recursive.pm

HTH :)

Lee.M

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to