use File::Copy; copy $file,$newpath or die "Cannot copy $file to $newpath:$!\n";