I don't know if anyone will find this useful but I have. I am writing CGIs on a system which has SSI enabled but does not have the CGI:SSI module installed.
I needed SSI for the website that I already had built so here is what I made...Please critique!
sub getInclude {
local ($/) = undef;
open (SSI, "<$_[0]") ||die "Cannot open $_[0] for reading: $!\n";
my $header = <SSI>;
close SSI;
return $header;
}
Then you can call it with:
$theheader = getInclude($myincludefile);
or, how I have been using it,
print getInclude($myincludefile);