one addition to the previous comments: File::Copy can copy files between existing directories only. If you destination directory doesn't exist now or you want to copy file somewhere in a directory tree take a look at File::Copy::Recursive which can create missing directories.