Hi,
If its in your /cgi-bin/ directory (as pointed to by your ScriptAlias in httpd.conf) then its possible you forgot to 'chmod o+x scriptname' .
If its outside that directory, you need to have the 'ExecCGI' option turned on in a <Directory> container, or in a .htaccess file if you have set 'AllowOverride All' to permit overrides of the defaults in parent directories. For example using a <Directory> container :
<Directory /web/docs>
Options ExecCGI FollowSymLinks
</Directory>
You also need the following in httpd.conf, but from that error code you probably have this one :
AddHandler cgi-script .cgi .pl
If its still a problem, post a bit more info on the server (linux/win ?) and directories involved, etc. Also, advise whether have you successfully run any other cgi scripts.
Hope this helps