I am new to perl and want to write a basic program to copy the entire directory contents to another directory. My first hurdle is that I need to give the absolute path for source and destination and I can't seem to get the following code to do that:
use strict; use warnings; use File::Copy; use File::Copy::Recursive qw(fcopy rcopy dircopy fmove rmove dirmove); my $source_dir = "C:\\Tools\\MyTool\\Scripts"; my $destination_dir = "C:\\Tools\\MyTool\\Scripts_Copy"; fcopy($source_dir,$destination_dir) or die $!;
When I execute this, I get the error that the "No such file or directory"