in reply to Interesting CGI Problem...
In addition to davido's advice I have found that CGI::Carp can be very valuable when hunting down errors in CGI scripts.