summaryrefslogtreecommitdiffstats
path: root/docs/cgi-examples/printenv
diff options
context:
space:
mode:
Diffstat (limited to 'docs/cgi-examples/printenv')
-rw-r--r--docs/cgi-examples/printenv6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/cgi-examples/printenv b/docs/cgi-examples/printenv
index f815a7e501..be74feaa82 100644
--- a/docs/cgi-examples/printenv
+++ b/docs/cgi-examples/printenv
@@ -11,10 +11,12 @@
##
## printenv -- demo CGI program which just prints its environment
##
+use strict;
+use warnings;
print "Content-type: text/plain; charset=iso-8859-1\n\n";
-foreach $var (sort(keys(%ENV))) {
- $val = $ENV{$var};
+foreach my $var (sort(keys(%ENV))) {
+ my $val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";