When Browser Displays Source Code Instead Of Running Script
If you type the URL of a Perl CGI script and the browser displays the source code of script instead of running the script, this may help.
Add the following two lines to the .htaccess file in the directory where the Perl CGI script is located (or create an .htaccess file in none already exists):
Options +ExecCGI AddHandler cgi-script cgi pl
Whether or not the above works depends on how the Apache server is configured. Sometimes, "Options" are disallowed.
Will Bontrager