OK, in your httpd.conf, look for:
AddHandler cgi-script .cgi
and add .pl:
AddHandler cgi-script .cgi .pl
Restart Apache by doing (as root):
apachectl restart
then try running the commandline again. If you got the same stdout that I posted earlier, you should be able to run the .cgi in the browser.