in reply to clobbering files with File::Copy

Take a look at the CopyFile( $src, $dst, $fileIfExists ) api in Win32API::File. The third parameter decides whether it will overwrite or fail if the file exists.

That probably won't help if the existing file is set readonly, but if you use the native api your likely to get more rational behaviour with respect to file permissions. Ie. If the source is not readonly, the destination won't.

You can use Win32::File to obtain and change the files attributes.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon