Greetings!
I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated automatically.
I learned enough Perl (read: just enough) to code a script that does what I want it to do. Now the question is: how to get it to run automatically.
I would like the program to be invoked when someone, anyone, hits my homepage. I know little about our environment -- I'm not a developer -- but know that I'm on a Windows box and that we're running IIS. Server-side includes work. Perl for use with forms works. Beyond that, I must offer my apologies for my cluelessness.
I've tried to use the #exec command on my HTML page to invoke the Perl script. Doesn't work. Here's the HTML to my test page:
[code=html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>testin g perl script from HTML page</title>
</head>
<body>
<!--#exec "d:/webdocs/www/irm/training/CGI/tipweek.pl" -->
<p>This page is to test to see whether I can run a Perl script from an HTML page.</p>
<p> </p>
<br>
</p><p>Other stuff on the page, including a server-side include below this line.</p>
<p>
<!--#include file="Tips/currenttip.txt" -->
<br>
</p>
</body>
</html>
[/code]
I do not get an error message, but the files that are supposed to be updated are not updated, so something isn't happening that should be happening.
If I enter the URL for the Perl script into my browser, the script runs; the files are updated.
I don't want the Perl script to create my homepage, as I'm not the only one who needs to be able to edit the page.
Is there some relatively painless way to invoke a Perl script (which doesn't use user input and doesn't need to return anything to the page) from an HTML page?
TIA!
I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated automatically.
I learned enough Perl (read: just enough) to code a script that does what I want it to do. Now the question is: how to get it to run automatically.
I would like the program to be invoked when someone, anyone, hits my homepage. I know little about our environment -- I'm not a developer -- but know that I'm on a Windows box and that we're running IIS. Server-side includes work. Perl for use with forms works. Beyond that, I must offer my apologies for my cluelessness.
I've tried to use the #exec command on my HTML page to invoke the Perl script. Doesn't work. Here's the HTML to my test page:
[code=html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>testin g perl script from HTML page</title>
</head>
<body>
<!--#exec "d:/webdocs/www/irm/training/CGI/tipweek.pl" -->
<p>This page is to test to see whether I can run a Perl script from an HTML page.</p>
<p> </p>
<br>
</p><p>Other stuff on the page, including a server-side include below this line.</p>
<p>
<!--#include file="Tips/currenttip.txt" -->
<br>
</p>
</body>
</html>
[/code]
I do not get an error message, but the files that are supposed to be updated are not updated, so something isn't happening that should be happening.
If I enter the URL for the Perl script into my browser, the script runs; the files are updated.
I don't want the Perl script to create my homepage, as I'm not the only one who needs to be able to edit the page.
Is there some relatively painless way to invoke a Perl script (which doesn't use user input and doesn't need to return anything to the page) from an HTML page?
TIA!
Comment