in reply to Why am I uploading nothing? $upload_filehandle appears to read nothing

Your code is a bit incomplete as the saysOutput function is missing. I assume that it is something like:

sub saysOutput { my( @message ) = @_; print "Content-Type: text/html\r\n\r\n"; print join "\r\n", @message; };

I would first try the snippet in the Processing-a-file-upload-field of CGI documentation for copying an uploaded file:

# undef may be returned if it's not a valid file handle if ( my $io_handle = $q->upload('field_name') ) { open ( my $out_file,">$upload_dir/$filename" ) or die "Couldn't create upload file: $!"; while ( my $bytesread = $io_handle->read($buffer,1024) ) { print $out_file $buffer; } }