First of all you need to create .htaccess file in dir from which you want to use your CGI scripts(If you want that dir be mainwebsite_html you just need to add rules into file because it is already created. Do not erase your .htaccess file in your mainwebsite_html dir because that will brake your Frontpage Extensions configuration):
AddHandler cgi-script cgi pl
After that in editor create a simple test program:
print "Content-type: text/plainnnIt works!n";
After that save it under the name test.cgi change the attribute of that file to 755 that is, do a command chmod 755 test.cgi. Than go to http://www.yourdomain.com/test.cgi and check does your CGI script works.