Yup. Here's a small CGI script that I wrote - nothing special - to print out the cgi environment on Windoze XP:
#!C:\Perl\bin use strict; ######## Start the HTML ######## print <<END_HTML; <html> <head> <title>Perl CGI Environment Variables</title> <STYLE type="text/css"> <!-- H1.page_title {text-align: center; color: blue} --> </STYLE> </head> <body> <h1 class="page_title">Perl CGI Environment Variables</h1> <table border="1"> <tr> <th bgcolor="#99ccff">\@INC Paths</th> </tr> END_HTML ### 1st print out the @INC array ### my $ct = 0; foreach my $dir (@INC) { print <<END_HTML; <tr> <td><b>$dir</b></td> </tr> END_HTML $ct++; } ######## Finish the @INC HTML ######### print <<END_HTML; </table> <br> <br> <table border="1"> <tr> <th bgcolor="#99ccff">Env Variable Name</th> <th bgcolor="#99ccff">Value</th> </tr> END_HTML ### Next print out all the environment variables ### foreach my $name (sort keys %ENV) { print <<END_HTML; <tr> <td><b>$name</b></td> <td>$ENV{$name}</td> </tr> END_HTML } ######## Finish the HTML ######### print <<END_HTML; </table> </body> </html> END_HTML
Put this in your webserver's document root. I called it "env.pl", so access it by:
http://your.server.com/env.pl
and see what environment variables it displays.

HTH.


In reply to Re^2: Access to Windows Environment Variables by hmerrill
in thread Access to Windows Environment Variables by PConD

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.