Couple of ways :

1) quick and dirty
        - if it's unix and you don't mind it not being portable to windows
        - do the -d test on the vars so you know they are directories and not evil 
commands to delete stuff or something

        if((-d $orig_dir)&&(-d $dest_dir)) { 
                print `cp -R $orig_dir $dest_dir`;
        }
        else { print "One of your directories is a bad monkey! \n"; }

2) more secure and portable

        try the File::Slurp ( I'm sure there's other more suited to your particular 
task )
        module or other modules at http://serach.cpan.org

Dan

> 
> Hi,
> 
> I want to copy whole directory structure and its 
> containts(may be file and folders under source directory) to 
> destination directory .i dont know how to do this .Can 
> anybody  help me. Thanks in advance ! Pankaj
> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to