I'm trying to successfully use File::Copy::Recursive from File-Copy-Recursive.-0.34.tar
I installed the PM correctly, as I don't get an error that the subroutine can't be found.
The function dircopy takes 2 variables, $orig and $dest for directories.
When I run it, I get an error:
"Uncaught exception from user code: Copy failed at copyfiles.pl at line 17"
Line 17 is simply the call to the function:
dircopy($orig, $dest) or die "Copy failed: $!";
The 2 variables are declared just before:
I have found absolutely no help anywhere on this.my $orig = "myOriginal";<p> my $dest = "myNewDirectory";<p>
Basically, I want to simply copy a directory recursively and create a copy of it somewhere else. Is there a better module to do this? What am I missing here?
Here is the entire bit:
Thanks,#!perl use warnings; use diagnostics; use File::Copy; use File::Path; use File::Copy::Recursive qw(fcopy rcopy dircopy fmove rmove dirmove); print "start\n"; my $orig = "nose"; my $dest = "nosey"; dircopy($orig, $dest) or die "Copy failed: $!"; print "done\n";
Doug
In reply to File::Copy::Recursive chokes on input by dbonneville
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |