You should have a directory generated by the apache server program called cgi-bin. Put your CGI stuff in there.
The folder is usually /var/www/cgi-bin/
Access the stuff in your browser (probably) with
http://localhost/cgi-bin/slippydoo.cgi
Where slippydoo is the name of your perl file.
Also make sure the shebang !#/usr/bin/perl actually is where your perl executable resides. (The above is no good if perl is in /usr/include/perl !!)
Make sure that the environment varibales such as the document root in the perl file are defined (if there are any such variables, if there aren't, that's ok).
Bert