$filename = $formdata{file}; @parts = split (/\\/,$filename); $sourcefilename = @parts[$#parts]; $targetdir = "\\\\\Giotto\\recourse"; $targetfilename = "$targetdir\\$sourcefilename"; print "The target directory for this file is: $targetdir"; print "This makes the target path: $targetfilename"; use File::Copy; if (copy $filename, $targetfilename) { print "Copy complete..."; } else { print "Error"; }