diff options
| author | Arno Töll <arno@debian.org> | 2012-10-20 02:58:14 +0200 |
|---|---|---|
| committer | Arno Töll <arno@debian.org> | 2012-10-20 02:58:14 +0200 |
| commit | 5c4fba3ffbe778bdffe10a93d04821579601a020 (patch) | |
| tree | 91be9a7f99d3988ba48b0a619479aa46a3234191 /docs/cgi-examples | |
| parent | 8f9c15530d0bc387af114619b3ff3f930eb23d3c (diff) | |
| download | apache2-5c4fba3ffbe778bdffe10a93d04821579601a020.tar.gz | |
Imported Upstream version 2.4.3upstream/2.4.3
Diffstat (limited to 'docs/cgi-examples')
| -rw-r--r-- | docs/cgi-examples/printenv | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/cgi-examples/printenv b/docs/cgi-examples/printenv index f815a7e5..be74feaa 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"; |
