in reply to LWP file upload question

When you a 500 error and "premature end of script headers", that usually means the script failed to run. Most likely because it couldn't compile because of syntax errors. Also, happens when perl is not running properly, or with line endings on the scripts. Look in the error log. If there is no message, try running the script from the command line and fix the errors. Add "use strict;" to the top and fix all those errors.

Also, upload takes the parameter name, not the filename.

my $file = $q->param('upload_file'); my $fh = $q->upload('upload_file');