The CGI module is also capable to handle your problem. It was very useful for me, however I did not want to trick with it. Just upload the file and save to a temporary place, and deny if it was too big. Search the string 'upload' in the manual of CGI.pm! :-)
--
tune