in reply to My Upload script, Am I even on the right track?

If you exceed POST_MAX CGI.pm flags it by setting cgi_error as follows....

$self->cgi_error("413 Request entity too large");

Just check the error messages using the cgi_error() method and the solution is to hand. Could I subtly hint that you read up about indentation. Settle on any style but aim for consistency. I find your code somewhat painful to read and harder to follow that it would be if it was formated in a less haphazard way. Have a look a perltidy and its output for some suggestions.

Now to be pedantic 1MB is 1024*1024 bytes so 1.7MB is 1.7*1024*1024 == 1782759 Bytes. This is nothing like 1536000 bytes. It is 1972633.6 bits different :-) When I read rather inaccurate comments like that it........

cheers

tachyon