httpd.apache.org has all the answers.
To run a cgi-script in the directory,you need to have access to the directory:
This means that in the apache config file, usually /etc/apache/httpd.conf, you need to allow access in the relevant Directory, Virtual Host or Location block by adding something like:
Allow from all
Note that the above opens that particular thing to everyone.
You also need to allow cgi scripts to be executed, so you have to add:
You'll beed to set a handler for it, by adding something like:
AddHandler cgi-script pl
assuming your perl script ends in pl.
Alternatively, you could set up a ScriptAlias directory.