in reply to Debugging perl cgi in apache
you can also start the CGI script from the shell, then
the CGI module will prompt you for the query string.
and then prints all the output. the usual -w and use strict,
might also help, along with checking wether there is an
empty line after the last line of the http-header.