I got some advice from my host, which is as follows:
Options ExecCGI
AddType application/x-httpd-cgi .cgi .sh .pl .htm .html
Now, a perl file with the extension .htm processed in the web directory gives a 500 server config error, even though the permissions are set to u+x.
The same file, with a cgi extension, works fine in the web directory. The permissions are the same, too.
Now it works fine, with just these two lines.
Options ExecCGI
AddHandler cgi-script .htm .html
Like you said, it works fine with just these two lines. For anybody else trying this, the permission thing needs to be set correctly, because I was getting a 500 premature end of script headers for a while.
This has been good for me to learn about the apache directives, what handlers are, etc. Painful though, reading all the stuff I could find on .htaccess.
If you're thorough, the reading at the official apache web server home page [apache.org] helps a lot.