Re: problem cp



Joe Smith (joe@xxxxxxxxx) wrote on MMMMCMXXVIII September MCMXCIII in
<URL:news:e86dnTAA8vt5fn7YnZ2dnUVZ_t6qnZ2d@xxxxxxxxxxx>:
?? Abigail wrote:
??
?? > use File::Copy;
?? > copy $file => $destination;
?? >
?? > needs two lines just to copy one file, is broken, is hopelessly inflexible,
?? > and will delete your files if you think 'copy' might mimic the 'cp' command.
??
?? Huh? Just how can copy() cause the input file to be deleted?


If you get the impression that 'copy' mimics the 'cp' command,
you might get the idea you can savely replace

copy "/etc/passwd", "/backup";
copy "/etc/shadow", "/backup";

with

copy "/etc/passwd", "/etc/shadow", "/backup";


The effect of that is that "/etc/shadow" will get truncated.



Abigail
--
perl -wle 'eval {die [[qq [Just another Perl Hacker]]]};; print
${${${@}}[$#{@{${@}}}]}[$#{${@{${@}}}[$#{@{${@}}}]}]'
.



Relevant Pages