in reply to Re^4: File Upload Size Check
in thread File Upload Size Check

From the documentation I linked to:

If CGI.pm detects a POST that is greater than the ceiling, it will immediately exit with an error message.

The code you posted displays an upload too large error on the condition:

if ( !$filename ) { ....