In our last episode,
the said:
Simple concept but its not clear anywhere how to implement a response
to a server (that has posted to my server) with some result. does
anyone know how, is a CPAN module required to do this ? I have seen
LWP for posting, but its not clear how to RESPOND to somebody's post
to my server...
Your post does not clearly indicate to me that you know the difference
between the several sense of the word "post." So I will say something about
the part that most nearly has something to do with perl.
In this situation:
You have set up a web page which contains an HTML form using the POST
method.
Perhaps you are asking:
In perl how do I do what should be done with the POST data and get the
server to send a page with some response to the data that has been recieved
via POST?
In that case the answer is something like this:
look for your answer in man CGI (unix-like systems) or perldoc CGI (any
system with perl installed). The CGI module has been part of the core
distribution for some time. You may find some additional help in section 9
of the FAQ "Networking." You can use the CGI module without an especially
deep understanding of what is going on behind the scenes.
Eventually you should understand that the perl CGI module is an easy way to
do CGI with perl, but neither perl nor CGI.pm (the module) is CGI. CGI is
the standard for getting servers and executables to interact. Just about
any executable that can write to stdout can be coerced into complying with
CGI, and that includes perl without the CGI module.
If the man page (or perldoc) is not enough help, you should be able to
google up a number of tutorials with keywords like perl, CGI, tutorial.
Whether any kind of CGI (perl, C, sh, php-cgi, etc.) will work for you at
all depends upon your server and configuration. So if you try to work
through a tutorial and cannot get your test documents to work at all, you
need to look at your server and its requirements.