in reply to CGI equivalent of Apache::DB?

Add -d to the #! line?

(A private message from the OP seems to confirm my guess.)