3 ## printenv -- demo CGI program which just prints its environment
8 print "Content-type: text/html\n\n";
11 <BODY bgcolor=#ffffff textcolor=#000000>
14 <FORM method="POST" ACTION="test.pl">
15 Input1 : <INPUT NAME="input1" value="" size="30" maxlength="30"><br>
16 Input2 : <INPUT NAME="input2" value="" size="30" maxlength="30"><br><br>
17 Option : <select name="option">
18 <option value="1">Option 1</option>
19 <option value="2">Option 2</option>
20 <option value="3">Option 3</option>
23 <input type="submit" value="Send">
30 print qq(<P
><B
>Form vars
</B
>\n<PRE
>\n);
31 foreach $p (param
()) {
32 print qq($p = '), param($p), qq('\n);
37 print qq(<P
><B
>Environment vars
</B
>\n<PRE
>\n);
39 foreach $var (sort(keys(%ENV))) {
43 print "${var}=\"${val}\"\n";
47 print qq(</body>\n</html
>\n);