in reply to calling html

Not 100% sure what you're trying to do here.

In your first example, you're just giving the browser an HTTP redirect. The browser re-requests from the server the URL that you give it, so the server is in turn parsing the SSI embedded in the HTML as if the browser requested that page originally. That's probably the "best" way of sending the user to a different HTML page.

Your second example is keeping the user in your CGI but having the CGI script print out the contents of the file. Since your CGI script is not doing any interpolation/parsing of the data before it gets sent, no SSI can be handled, and the server will not post-parse your CGI output for SSI directives.p> In this latter case, if it's SSI features in Perl that you want, I don't believe there are any modules out there that will do this, so you'll have to roll your own. I'd see if Apache::SSI has something useful you can borrow. You'll probably end up having to use some regular expressions or even go so far as HTML::Parser if you want to be accurate about it, pull out the SSI "comments" and run them through your own code. There's got to be a better way of doing what you're trying to do, though.

Good luck.

Originally posted as a Categorized Answer.