in reply to Perl and SSI

Since this is CGI, the webserver passes the request off to your script and it is then up to you to return data. This means that the server won't parse documents with SSI in them. Search CPAN for SSI; I know there are some modules that can parse the SSI for you from within Perl.