'Morning, Everyone--

On my company's intranet, I've built a CGI script that accepts a product ID, uses it to query our product database, and generates a page dynamically to the browser. Simple enough...

...until the Powers That Be decided to redesign the intranet reference system. Now, they're wanting to use SSI (argh!) to include a newly designed navigation thingumy at the top of all the pages. The problem that I've run up against is trying to get my script to parse the HTML and execute the SSI directives before printing the page to the browser. My company is tight about installing new modules on our machines, so I can't use CGI::SSI, CGI::SSI_Parser, or Apache::SSI (we're running a Netscape webserver, too. Gurgle...).

It's starting out pretty simple now, only including one .shtml file in the dynamic output. I want to be prepared, however, to handle this monster if it gets any bigger, with SSI #exec directives or whatever. I'd hate to have to roll my own module, and I don't want to do it the clunky way, manually retrieving the included file, reading into a scalar, and printing it inline with the usual output.

Is there a simpler way of doing this, by either modifying the document header, or something? Or am I going to have to make my own module, or manually retrieve the file?

Thanks so much for any help!

------------------------
higle
perl -e 's=$;$/=$\;W=i;$\=$/;s;;XYW\\U$"\;\);sig,$_^=$[x5,print;'

In reply to Parsing SSI through CGI by higle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.