in reply to Re: What is the easiest way to copy one file to another?
in thread What is the easiest way to copy one file to another?

? This implements a file move, not a copy.

I think the questioner wanted a piece of code that would produce two files with identical contents. This expects both $newfile and $oldfile to exist beforehand. It's very different from what File::Copy would do. (It's not wrong code, it just does something different.)