If your script generates an error and says "script produced no output" instead of an informative error message, insert the following "use" statement at the beginning of your scripts:

use CGI::Carp qw(fatalsToBrowser);

This will redirect fatal error messages to browser output.