in reply to bugs anyone?

Try adding the line
use CGI::Carp qw( fatalsToBrowser );
to your script. It will redirect perl errors to your browser.

If that doesn't show what's wrong, break your script into smaller pieces and run them. That will help you find the area in question. Then look closely at that section.

If you still can't find the problem, post the section of code that's causing the problem. Less than a dozen lines should be more than enough to reproduce the problem. You're more likely to get a response if you narrow it down first. In fact, you're quite likely to find it yourself :)