projects
/
apache
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c99e63
)
Encourage best practice, even though it's a trivial example.
author
Rich Bowen
<rbowen@apache.org>
Wed, 9 May 2012 01:30:15 +0000
(
01:30
+0000)
committer
Rich Bowen
<rbowen@apache.org>
Wed, 9 May 2012 01:30:15 +0000
(
01:30
+0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1335882
13f79535
-47bb-0310-9956-
ffa450edef68
docs/cgi-examples/printenv
patch
|
blob
|
history
diff --git
a/docs/cgi-examples/printenv
b/docs/cgi-examples/printenv
index f815a7e501966fe31c2d3011c5e0b99d2abd17ce..be74feaa82e9bb540f81816e686ecbfcd80b61b6 100644
(file)
--- 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";