Update:
Well I finally looked at the code, and know how you guys accually do it :)
Thanks for you reply's, Iam working putting something like that in this little
site engine Iam putting to gether my self, though Iam trying to figure out the lazy solution which is to get
Apache::ASP to just interpret code (since thats the only Perl in HTML method I have used as of yet).
Two other methods which may be easier are HTML::Embperl and Template Toolkit. There are lots of other tools, but I've checked out both of those and they're quite good.