#!/usr/bin/perl
&print_HTTP_header;
&print_head;
&print_body;
&print_tail;
# print the HTTP Content-type header
sub print_HTTP_header {
print "Content-type: text/html\n\n"; }
# Print the HTML preamble
sub print_head {
<HTML><HEAD>
<TITLE>Environment Variables</TITLE>
</HEAD>
<BODY>
<H1>Environment Variables:</H1>
END
}
#Loop through the environment variable
#associative array and print out its values.
sub print_body {
print "<B>$variable:</B> $ENV{$variable}<BR>\n"; }
}
#Print the end of the document
sub print_tail {
</BODY>
</HTML>
END
}
IyEvdXNyL2Jpbi9wZXJsCgoKJnByaW50X0hUVFBfaGVhZGVyOwomcHJpbnRfaGVhZDsKJnByaW50X2JvZHk7CiZwcmludF90YWlsOwoKCiMgcHJpbnQgdGhlIEhUVFAgQ29udGVudC10eXBlIGhlYWRlcgpzdWIgcHJpbnRfSFRUUF9oZWFkZXIgewogICAgcHJpbnQgIkNvbnRlbnQtdHlwZTogdGV4dC9odG1sXG5cbiI7Cn0KCgojIFByaW50IHRoZSBIVE1MIHByZWFtYmxlCnN1YiBwcmludF9oZWFkIHsKICAgIHByaW50IDw8RU5EOwo8SFRNTD48SEVBRD4KPFRJVExFPkVudmlyb25tZW50IFZhcmlhYmxlczwvVElUTEU+CjwvSEVBRD4KPEJPRFk+CjxIMT5FbnZpcm9ubWVudCBWYXJpYWJsZXM6PC9IMT4KRU5ECn0KCgojTG9vcCB0aHJvdWdoIHRoZSBlbnZpcm9ubWVudCB2YXJpYWJsZSAKI2Fzc29jaWF0aXZlIGFycmF5IGFuZCBwcmludCBvdXQgaXRzIHZhbHVlcy4Kc3ViIHByaW50X2JvZHkgewogICAgZm9yZWFjaCAkdmFyaWFibGUgKHNvcnQga2V5cyAlRU5WKSB7CglwcmludCAiPEI+JHZhcmlhYmxlOjwvQj4gJEVOVnskdmFyaWFibGV9PEJSPlxuIjsKICAgIH0KfQoKCiNQcmludCB0aGUgZW5kIG9mIHRoZSBkb2N1bWVudApzdWIgcHJpbnRfdGFpbCB7CglwcmludCA8PEVORDsKPC9CT0RZPgo8L0hUTUw+CkVORAp9Cg==