You could try looking at the template for SSI tags, and if there is one, use do or eval to execute it. Here's an example:
open(DATA,"hello.template"); my @template=<DATA>; close(DATA); print "Content-type: text/html\n\n"; for my $line (@template) { # you should probably use an HTML parsing module # here instead of a regex if ($line =~ m/<!--#include virtual="(.*?)"-->/) { my $include = $1; do $include; } else { print $line; } }
In reply to Re: Perl executing SSI/ include virtual
by beable
in thread Perl executing SSI/ include virtual
by Avitar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |