First assured
LoadModule CGI_Module Modules / MOD_CGI.SO
The front ## is removed
Then remove the ADDHANDLER CGI-Script .cgi front #,
And plus a line of AddHandler CGI-Script .pl
And in the configuration of the directory, you want to join Execcgi, the following is an example
Options Indexes Followsymlinks Execcgi Includes
ALLOWOVERRIDE NONE
ORDER ALOW, DENY
ALLOW FROM ALL
#php_flag engine off # Remove the front # can make this directory not support PHP scripts
Directory>