in reply to help needed in File::copy

If I understand properly, you should check the file permissions after it got created the first time. It is probably set to read-only for user.
See the umask function for details.

-imran