in reply to Correct code for deleting old file?

Note that you delete the file before you have retrieved a new version (which might fail).

I would not delete the old file but rename it (or move it somewhere else) so that you can fall back on it.

You can rename or more a file with the move-function from File::Copy.

  • Comment on Re: Correct code for deleting old file?