in reply to How do I get QUERY_STRING when I use sockets?

Hmmm... So it looks to me like you've written your own web server. Thus, if you want CGI variables you'll need to get them yourself. That means you'll need to read the query sent by the browser and parse it. See the "Extracting a QUERY string" code in the snippets section; I've taken the liberty of patching in your code there. Also, you'll probably want to add the required HTTP headers to the output, so that an actual browser can look at it. (I'm assuming that browsers are looking at this, else why the query string? The query string is an artifact of the HTTP protocol.) I think also that there's a premade HTTP server module available on CPAN. You can probably adapt it for this use. Also, there's the URI module that comes with Perl; you can use that to parse the URL, and it will probably be more robust than my quick implementation. Good luck; we're all counting on you.
  • Comment on Re: How do I get QUERY_STRING when I use sockets?