PDA

View Full Version : Can you use PERL and SSI like PHP and ASP???


bcarl314
05-22-2003, 05:12 PM
Simple enough question, but the answer I seem to come across is no.

I would like to create a .shtml page like this:
[code]
<!--#exec cgi="myCGIScript.cgi" -->
//This give me a variable "myVar"
<html>
<head></head>
<body>
<!--#
if($myVar eq 'yes') {
-->
<p>PRINT GOOD STUFF HERE</p>
<!--#
} else {
-->
<p>BAD STUFF</p>
<!--#
}
-->
</body>
</html>

Roy Sinclair
05-22-2003, 05:46 PM
Under IIS, PERL is a language you can use on your ASP pages if you use the PERL distribution from ActiveState. Using Perl as a CGI though doesn't give you that ASP/PHP type capability though PERL alone doesn't really need it.


## Put the PERL code from myCGIScript.cgi here

print <<"--ENd"; # Start of HTML Code
<html>
<head></head>
<body>
--ENd ## End of HTML Code
if($myVar eq 'yes') {
print <<"--End";
<p>PRINT GOOD STUFF HERE</p>
--ENd
} else {
print <<"--ENd";
<p>BAD STUFF</p>
--ENd
}
print <<"--ENd";
</body>
</html>
--ENd;