use File::Copy; cp "\\\\$machine\\$sharename\\some\\directory\\and\\a\\file.txt", "here.txt" or die "Couldn't copy: $!";