If that's all I wanted, I could just write the HTML file myself.
In Perl, for instance, I can write a script that outputs HTML.
If I run the script
via a CGI-BIN server or similar, I presume?
it outputs the text to the screen. But I
can point Internet Explorer at the script, and it displays
a web page. This is dynamically generated, it varies according
to data read from a database.
Depends on what support your host has for CGI. Geocities, for example,
doesn't have any. Point IE at a Perl script hosted there, and you
get a screenful of line noise. (Perl source, that is.) The same thing
happens if I point IE at a Perl script on my hard disk, although if
you have it configured differently, I've no doubt you could get a "CGI
server" on your own machine. I'd kind of like that.
I've written an application in perl, but I want to port it to
C++ or similar, using a complied executable instead of a
Perl script.
Look up the Perl equivalent of 'system()'. Then compile your C++
program to an executable (for whatever OS is running on your host
machine), and exec that program via a Perl script. Completely
untested and OT stuff follows:
% cat hello.cc
#include <iostream>
int main()
{ std::cout << "Hello world!" << std::endl; return 0; }
% cat hello.cgi
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print `./hello`; ## Note the backquotes!
% g++ -o hello hello.cc
% chmod 755 hello.cgi
HTH,
-Arthur