in reply to Speed consideration
There's a third option that's close in spirit to your first choice: Instead of using regular expressions to rewrite the HTML, usage a templating mechanism (e.g., HTML::Template).
Your second scheme starts a process per SSI insertion. Under load, this'll kill you.
Don't be concerned that the page you're building is 40K or so. That's peanuts compared with the overhead launching several process.
|
|---|