Be sure that you're returning a valid header to the browser before any content. The standard header for HTML is: Content-type: text/html, followed by two newlines. If you're using CGI.pm, you can use the following:
print $q->header();
Since you're privileged enough to use a Unix-like system, the
Idiot's Guide to Solving Perl CGI Problems may be of use to you. (I read it five or six times while making my first Perl CGI, and two times for the second. Don't mind the title.)