in reply to Error detection on CGI file upload attempts
Sounds like the real problem is not the upload, but trying to store upload. Why don't you just try to copy the file and let $! report the error for you? If $! is defined, then the copy did not work and will contain a (good enough) reason to report back to the user. For the most part, the upload either worked or it didn't so I don't feel the need to tell a user all the many reasons why it didn't work. 9 times out of 10 the upload didn't work due to permission problems (that's a bug) and the other 1 is hitting the max upload limit. Is it really your responsibility to keep them from uploading empty files? What if they really wanted to upload an empty file?
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|