On unix, File::Copy needs to be called when moving a file,
If you like to be surprised or use non-flexible API, you'd use File::Copy. If you're smart, you'd use system cp. Things that are easy with system cp and awkward with File::Copy include:
cp file1 file2 dir
cp -r dir1 dir2
cp -p file1 file2
cp exe1 exe2
Not to mention that I can stick an 'r' or an 's' in front of it, and copy from one machine to another. | [reply] |
Unfortunately system(qw(cp ...)) is not portable. That's why there is File::NCopy, which I would like to see in the perl core instead of File::Copy.
| [reply] |
Mark Ceulemans wrote:
On unix, File::Copy needs to be called, and you say that 'system cp' isn't portable. Could you point out a Unix system that doesn't have cp?
| [reply] |