When someone uses s browser and goes to awww.somesite.com/someperl.plhow does
it work at the server end? Let's say I'd like to create a "perl-clone" or
something like perl or php where would I get more info?
There are a number of ways this /could/ work, but the simplest case
perhaps is CGI. It works like this:
1. The client user accesses
http://example.com/script.cgi
2. The client browser constructs an HTTP header and perhaps body
3. The package is sent over the wire to some web server
4. The web server receives the HTTP request and parses it
5. The web server decides that 'cgi' represents a call to a script,
and hands it off to a script, invoking the Perl executable, and sends
the appropriate parameters
6. The Perl executable executes the script, accepting the parameters
as input and returning the appropriate results as output. This usually
consists of HTML, but could consists of other things and usually
involves some other kinds of machinations behind the scenes, like
running some SQL against a database and munging the SQL results
7. The web server receives the return value from the script and sends
it back down the wire to the client browser
8. The client browser renders the HTML, or does some else (like show a
Flash movie or play a wav file)
CC.