in reply to Making webpages from a single CGI
one real quick further comment on this, just so the guy doesn't get too confused when it still doesn't do what he wants it to 100%... that SSI you have in there that reads in sidebar.txt is also of course designed to save on writing code.. Thing is, you probably want to go ahead and just paste the contents of that file into your CGI script as well since your '<!--#include' will never bee "seen" by the webserver daemon and thus won't get parsed..
From the question and the (seemingly) superfluous inclusion of Adobe PageMill's meta tag, I figured you might not be too familiar with what all was going on in that file so that when you got it working according to the other suggestions, you might be posting here again with a "it works but..." :)
Hope that's useful to you.
--ScottVR