C
Charles
Hi there.
This is probably the most basic of all questions, and I've looked at
various scripts which show how to do it (such as counters, time displays
etc) and online resources to get an answer, but my version still won't
work even though I'm using the same commands. I would be grateful if
someone could point me in the right direction before I tear my hair out!
All I want to do, and I'm doing this so I can learn how to use perl, is
display some text on a static web page.
I have index.html with the following
<html>
<body>
<p>This is some text</p>
<p><script src="../cgi-bin/hello.cgi"></script></p>
</body>
</html>
I have hello.cgi with the following (permissions are 755)
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello. Thanks for dropping by\n";
But all the web page shows is:
This is some text
I've changed the src to the complete address but it still doesn't work.
Has anyone got any ideas on what I'm doing wrong?
Thanks in advance and I'm really sorry if this is so dumb, but I am
trying to learn as fast as I can.
Cheers!
This is probably the most basic of all questions, and I've looked at
various scripts which show how to do it (such as counters, time displays
etc) and online resources to get an answer, but my version still won't
work even though I'm using the same commands. I would be grateful if
someone could point me in the right direction before I tear my hair out!
All I want to do, and I'm doing this so I can learn how to use perl, is
display some text on a static web page.
I have index.html with the following
<html>
<body>
<p>This is some text</p>
<p><script src="../cgi-bin/hello.cgi"></script></p>
</body>
</html>
I have hello.cgi with the following (permissions are 755)
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello. Thanks for dropping by\n";
But all the web page shows is:
This is some text
I've changed the src to the complete address but it still doesn't work.
Has anyone got any ideas on what I'm doing wrong?
Thanks in advance and I'm really sorry if this is so dumb, but I am
trying to learn as fast as I can.
Cheers!