At 04:40 PM 5/22/2001 +0800, Kan, Yu-Ting wrote:
>Dear all,
>I found that there are a lot environment variable called by perl
>like $ENV{'REQUEST_METHOD'} and $ENV{'CONTENT_LENGTH'}
>
>I need that for writing cgi programs in perl. How and where can I find all
>of them?
>
>Thanks a lot
>
>regards
>Kan
>_______________________________________________


Copy the following to a file (such as /cgi-bin/env.pl ) and hit it from your browser.  
It will show you all the values available to you.

-dave


print "Content-type: text/html\n\n<font size=+3>$ENV{GATEWAY_INTERFACE}</font>
<table border=1 cellpadding=2 cellspacing=0>\n";

foreach $var (sort keys %ENV) {
        print "<tr><td>\$ENV{<b>$var</b>} </td><td>$ENV{$var}</td></tr>\n";
}

print "</table>\n";

print "Also of note:<p>
<li>    \$0 is $0
<li>    time is " . (time) . "
<li>    time is " . (scalar localtime) ."
<p>";




-- 
David Hempy 
Internet Database Administrator
Kentucky Educational Television - Distance Learning Division
<[EMAIL PROTECTED]> -- (859)258-7164 -- (800)333-9764


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to