http://qs321.pair.com?node_id=299574


in reply to File Uploading

You might add some more error checking for example: use strict;

and...

open (UPLOADFILE, ">$dirpath/$filename") or die "bad open $dirpath/$filename\n $!";

You might look at CGI::POST_MAX Your system admin may have set it in CGI.pm

perldoc CGI # skip some stuff $CGI::POST_MAX If set to a non-negative integer, this variable puts a ceiling on the size of POSTings, in bytes. If CGI.pm detects a POST that is greater than the ceiling, it will immediately exit with an error message. This value will affect both ordinary POSTs and multipart POSTs, meaning that it limits the maximum size of file uploads as well. You should set this to a reasonably high value, such as 1 megabyte.