apache – CGI scripts will not run on the website

I have a working website, but the cgi scripts in / Library / WebServer / CGI-Executables will not run. Instead, the text of the file is loaded into the browser. I've added the following files to the httpd.conf file:

LoadModule cgi_module /usr/libexec/apache2/mod_cgi.so
ScriptAliasMatch ^ / cgi-bin / ((?! (? I: webobjects)). * $) "/ Library / WebServer / CGI-Executable / $ 1"
AddHandler cgi-script .cgi
 
       Options + ExecCGI
AddHandler cgi-script .cgi
   

I am able to run Perl scripts from the command line without any problem.