in reply to Problems uploading file

What does the error log say when it dies? We can't help you otherwise.

One thing I see is that you don't have a method parameter on the form. GET is the default so you must have method="POST" on the form element.

Another problem could be a wrong name. Check if the filename is undef because expected parameter was not passed. Another possible problem is that the upload failed or could not be parsed. This would definitely happen when using GEt instead of POST. The upload method should return undef, and the error will be in cgi_error. Check the error condition.