|No such thing as a small change|
Re: Embeding Perl in HTML the PHP wayby greengaroo (Hermit)
|on Sep 13, 2012 at 13:36 UTC||Need Help??|
When I first started learning and programming Perl, back in 1999, I was doing exactly what you want to do!
Basically what you want to do is add something like this do your httpd.conf file:
This will make Apache pre-parse the .iphtml files and interprets any embedded Perl scripts. Basically, your .iphtml files are HTML files with Perl script blocks. Note that the extension of the files could be anything you want, even .html but keep in mind this means all .html files would be pre-parsed, even if they don't contain embedded Perl.
So this is what a Perl script blocks would look like:
Pretty close to PHP, hey? I think you can even change the embedded block delimiters to whatever you want with Apache::ePerl module configuration.
I remember, I even created websites using embedded Perl inside XML files back in the days! I was using AxKit! But it as been decommissioned in 2009.