Welcome to the Monastery | |
PerlMonks |
Re: Copying a file across servers in DOSby Kanji (Parson) |
on Oct 19, 2010 at 02:07 UTC ( [id://866089]=note: print w/replies, xml ) | Need Help?? |
You can run external commands in Perl with system(), exec() or backticks/qx():-
You might also find the Shell module useful, as it will allow you to use xcopy as if it were a Perl command:-
However, Perl does support UNC-style paths (if your OS does), so you could use plain ol' open() or a more elaborate (robust?) wrapper like File::Copy:-
(Note that the native Perl calls support the alternate use of forwardslashes, which will save you from excessive escaping of UNC paths.) --k.
In Section
Seekers of Perl Wisdom
|
|