in reply to Running Perl thru HTML

If your page actually _is_ a script, it runs upon opening, i.e. CGI or mod_perl, depending on your Apache setup. You can set it up to run a background job which does whatever, including reading from the Apache environment variables the information you want from the user's system. Once it's launched the background job, you have it print the next HTML page, which has a meta-refresh embedded in it. In the mean time, your background job completes creating its page, and the refresh sends your user to it. That's the long way, to be used only if you have lots of stuff to do. In reality, Perl can do the simple stuff you ask of it so that the dynamic stuff happens between the click and the new page appearing. It's only if you need the pages to stay visible long enough for human eyeballs to read and minds to process that you need to resort to refreshes et al.

Short way: or long way:
A caveat is that the referrer and user variables that Apache maintains are often only those of proxies, so you will often get the ip's of AOL proxy machines as opposed to the end-user ip.

Some links:

http://httpd.apache.org/docs/env.html
http://www.apachefreaks.com/apache2/env.html
http://cgi.resourceindex.com/Documentation/Environment_Variables/

Replies are listed 'Best First'.
Running IIS
by GhostWheel (Initiate) on Mar 15, 2005 at 12:23 UTC
    I'm running IIS. Does this make any difference? If so, what should I do differently?
      You can run normal CGI scripts written in Perl from IIS,assuming you've also got Perl installed. I'm not sure where the equivalent of Apache ENV variables are, though. I'd start by looking at CGI.pm on CPAN, but beyond that you might need to look into the Win32:: modules.

      A better option by far -- and probably easier to -- is to ditch IIS and install Win32 Apache if you possibly can. I'm afraid I can't be much more help, as I have not kept up with Doze issues since W3.1.