in reply to CGI Question

I would recommend using File::Copy instead of writing the script by hand. The syntax is simply: Copy("from file", "to file")
Also, you could check directories for read/write access using if (-w $file && -r $file) and chmod() the directory if necessary.