In order to successfully debug a problem like this, you have to divide and conquer. Perform simple tests that verify that just one part of the equation is working correctly. That will let you narrow down where the real problem is.
Some examples of tests you might perform:
And so on. In this way you can figure out exactly where the problem is. If you still can't get it to work, you will at least have learned enough to post a specific, well-informed question.
- View source in your browser. Has your script generated the page as you expect?
- Test some of the features you want to use in a regular Perl script before putting them into a server environment.
When's the last time you used duct tape on a duct? --Larry Wall