in reply to Limiting size of uploads

Just another possible alternatives. If what you want to test is a filehandle size you can use Perl's -s function.
my $q = new CGI; my $filehandle = $q->upload("file"); my $fsize = -s $filehandle; my $fsize_limit = 1000; # Then you use conditional to check them: if ($fsize > $fsize_limit) { # do whatever you want }
If it the file is tied to a variable you can simply use length function:
# let's say you have a data captured in textrea textarea( -name => 'sequence', -rows => 10, -columns => 50, -wrap => 'physical' ),br # then you would need to store it into a variable my $seq_var = param('sequence'); # Size of the variable is captured this way: my $fsize = length($seq_var); if ($fsize > $fsize_limit) { # Do whatever you want }

Regards,
Edward