◇index.shtml
<!--#include file="hoge.cgi"-->

◇hoge.cgi
#!/〜/bin/perl

print "Location:http:〜.html \n\n";

とすると
an erorr occurred while processing this directive
というエラーが表示されてしまいます。

hoge.cgiに直接アクセスすると正常に動作します。
hoge.cgiのprint部分を
print <<"EOM";
Content-type:text/html

Hello
EOM
としてindex.htmlにアクセスすると正常に表示されます。

何が原因でエラーとなってしまうのでしょうか?