in reply to How do I detect and handle empty form fields?

my @InvalidFields = grep {not defined CGI::param($_) or CGI::param($_) eq ''} CGI::param +();

@InvalidFields will now contain the names of any empty fields.

Evaluate @InvalidFields in a scalar context to see how many empty fields there are.
if (@InvalidFields){ # You have some empty fields, so do something about them }

This general technique will work even if you are not using CGI...

Russ