diff --git a/tests/ChangeLog b/tests/ChangeLog
index 187a65a4..4c1b7de7 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,34 @@
+2008-11-12  Steven Schubiger  <stsc@members.fsf.org>
+
+	* Test-auth-basic.px, Test-auth-no-challenge.px,
+	Test-auth-no-challenge-url.px, Test-c-full.px,
+	Test-c-partial.px, Test-c.px, Test-c-shorter.px,
+	Test-E-k-K.px, Test-E-k.px, Test-ftp.px, 
+	Test-HTTP-Content-Disposition-1.px, 
+	Test-HTTP-Content-Disposition-2.px,
+	Test-HTTP-Content-Disposition.px, Test-N-current.px,
+	Test-N-HTTP-Content-Disposition.px,
+	Test-N--no-content-disposition.px,
+	Test-N--no-content-disposition-trivial.px,
+	Test-N-no-info.px, Test--no-content-disposition.px,
+	Test--no-content-disposition-trivial.px, Test-N-old.px,
+	Test-nonexisting-quiet.px, Test-noop.px, Test-np.px,
+	Test-N.px, Test-N-smaller.px, 
+	Test-O-HTTP-Content-Disposition.px, Test-O-nc.px,
+	Test-O--no-content-disposition.px, 
+	Test-O--no-content-disposition-trivial.px,
+	Test-O-nonexisting.px, Test-O.px,
+	Test-proxy-auth-basic.px, Test-Restrict-Lowercase.px,
+	Test-Restrict-Uppercase.px,
+	Test--spider-fail.pxm, Test--spider.px,
+	Test--spider-r-HTTP-Content-Disposition.px,
+	Test--spider-r--no-content-disposition.px,
+	Test--spider-r--no-content-disposition-trivial.px,
+	Test--spider-r.px: Enforce lexically scoped warnings.
+
+	* Test-proxied-https-auth.px, run-px: Place use strict
+	before use warnings.
+
 2008-11-12  Steven Schubiger  <stsc@members.fsf.org>
 
 	* FTPServer.pm, FTPTest.pm, HTTPServer.pm, HTTPTest.pm:
diff --git a/tests/Test--no-content-disposition-trivial.px b/tests/Test--no-content-disposition-trivial.px
index 6a5b1def..43eb7bfd 100755
--- a/tests/Test--no-content-disposition-trivial.px
+++ b/tests/Test--no-content-disposition-trivial.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--no-content-disposition.px b/tests/Test--no-content-disposition.px
index 4975913b..7736a2e5 100755
--- a/tests/Test--no-content-disposition.px
+++ b/tests/Test--no-content-disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--spider-fail.px b/tests/Test--spider-fail.px
index b30ef755..6e5c976d 100755
--- a/tests/Test--spider-fail.px
+++ b/tests/Test--spider-fail.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--spider-r--no-content-disposition-trivial.px b/tests/Test--spider-r--no-content-disposition-trivial.px
index 1e850d40..0bd7d29e 100755
--- a/tests/Test--spider-r--no-content-disposition-trivial.px
+++ b/tests/Test--spider-r--no-content-disposition-trivial.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--spider-r--no-content-disposition.px b/tests/Test--spider-r--no-content-disposition.px
index 4eba8579..78beb18d 100755
--- a/tests/Test--spider-r--no-content-disposition.px
+++ b/tests/Test--spider-r--no-content-disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--spider-r-HTTP-Content-Disposition.px b/tests/Test--spider-r-HTTP-Content-Disposition.px
index 09f93fa3..e79152f7 100755
--- a/tests/Test--spider-r-HTTP-Content-Disposition.px
+++ b/tests/Test--spider-r-HTTP-Content-Disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--spider-r.px b/tests/Test--spider-r.px
index a315d974..b32f792d 100755
--- a/tests/Test--spider-r.px
+++ b/tests/Test--spider-r.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test--spider.px b/tests/Test--spider.px
index dbc97135..6e8ba499 100755
--- a/tests/Test--spider.px
+++ b/tests/Test--spider.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-E-k-K.px b/tests/Test-E-k-K.px
index d71c39e5..4a2cf614 100755
--- a/tests/Test-E-k-K.px
+++ b/tests/Test-E-k-K.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-E-k.px b/tests/Test-E-k.px
index 4581ed71..40d6b6dc 100755
--- a/tests/Test-E-k.px
+++ b/tests/Test-E-k.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-HTTP-Content-Disposition-1.px b/tests/Test-HTTP-Content-Disposition-1.px
index 01fb0901..3d270143 100755
--- a/tests/Test-HTTP-Content-Disposition-1.px
+++ b/tests/Test-HTTP-Content-Disposition-1.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-HTTP-Content-Disposition-2.px b/tests/Test-HTTP-Content-Disposition-2.px
index 46c16a17..6550d36f 100755
--- a/tests/Test-HTTP-Content-Disposition-2.px
+++ b/tests/Test-HTTP-Content-Disposition-2.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-HTTP-Content-Disposition.px b/tests/Test-HTTP-Content-Disposition.px
index 3b6eb2c9..afc964a4 100755
--- a/tests/Test-HTTP-Content-Disposition.px
+++ b/tests/Test-HTTP-Content-Disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N--no-content-disposition-trivial.px b/tests/Test-N--no-content-disposition-trivial.px
index c58f451a..83f0e4ed 100755
--- a/tests/Test-N--no-content-disposition-trivial.px
+++ b/tests/Test-N--no-content-disposition-trivial.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N--no-content-disposition.px b/tests/Test-N--no-content-disposition.px
index 78fe522f..f142d306 100755
--- a/tests/Test-N--no-content-disposition.px
+++ b/tests/Test-N--no-content-disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N-HTTP-Content-Disposition.px b/tests/Test-N-HTTP-Content-Disposition.px
index 32f87710..d33155e4 100755
--- a/tests/Test-N-HTTP-Content-Disposition.px
+++ b/tests/Test-N-HTTP-Content-Disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N-current.px b/tests/Test-N-current.px
index b8e05a94..0ef47289 100755
--- a/tests/Test-N-current.px
+++ b/tests/Test-N-current.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N-no-info.px b/tests/Test-N-no-info.px
index 301a9101..9dec6eda 100755
--- a/tests/Test-N-no-info.px
+++ b/tests/Test-N-no-info.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N-old.px b/tests/Test-N-old.px
index 6ae116e5..fe16dbfb 100755
--- a/tests/Test-N-old.px
+++ b/tests/Test-N-old.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N-smaller.px b/tests/Test-N-smaller.px
index 71e34d96..e5dceae6 100755
--- a/tests/Test-N-smaller.px
+++ b/tests/Test-N-smaller.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-N.px b/tests/Test-N.px
index 2e235e08..2f139b51 100755
--- a/tests/Test-N.px
+++ b/tests/Test-N.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-O--no-content-disposition-trivial.px b/tests/Test-O--no-content-disposition-trivial.px
index 501fd44d..75a3e6f1 100755
--- a/tests/Test-O--no-content-disposition-trivial.px
+++ b/tests/Test-O--no-content-disposition-trivial.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-O--no-content-disposition.px b/tests/Test-O--no-content-disposition.px
index 592f0fec..3369ec42 100755
--- a/tests/Test-O--no-content-disposition.px
+++ b/tests/Test-O--no-content-disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-O-HTTP-Content-Disposition.px b/tests/Test-O-HTTP-Content-Disposition.px
index 934f54aa..e18880a7 100755
--- a/tests/Test-O-HTTP-Content-Disposition.px
+++ b/tests/Test-O-HTTP-Content-Disposition.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-O-nc.px b/tests/Test-O-nc.px
index 08819e4b..530ac654 100755
--- a/tests/Test-O-nc.px
+++ b/tests/Test-O-nc.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-O-nonexisting.px b/tests/Test-O-nonexisting.px
index 89744fc8..60ef7c70 100755
--- a/tests/Test-O-nonexisting.px
+++ b/tests/Test-O-nonexisting.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-O.px b/tests/Test-O.px
index 1f4e8efe..552c6654 100755
--- a/tests/Test-O.px
+++ b/tests/Test-O.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-Restrict-Lowercase.px b/tests/Test-Restrict-Lowercase.px
index 2b35f1e4..e5d270dc 100755
--- a/tests/Test-Restrict-Lowercase.px
+++ b/tests/Test-Restrict-Lowercase.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-Restrict-Uppercase.px b/tests/Test-Restrict-Uppercase.px
index 14fa81f4..1175fbd2 100755
--- a/tests/Test-Restrict-Uppercase.px
+++ b/tests/Test-Restrict-Uppercase.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-auth-basic.px b/tests/Test-auth-basic.px
index 75013609..e60be4c7 100755
--- a/tests/Test-auth-basic.px
+++ b/tests/Test-auth-basic.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-auth-no-challenge-url.px b/tests/Test-auth-no-challenge-url.px
index 53f6245b..4b947ed2 100755
--- a/tests/Test-auth-no-challenge-url.px
+++ b/tests/Test-auth-no-challenge-url.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-auth-no-challenge.px b/tests/Test-auth-no-challenge.px
index 19b2a6d6..ec322844 100755
--- a/tests/Test-auth-no-challenge.px
+++ b/tests/Test-auth-no-challenge.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-c-full.px b/tests/Test-c-full.px
index f277a023..2d107453 100755
--- a/tests/Test-c-full.px
+++ b/tests/Test-c-full.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-c-partial.px b/tests/Test-c-partial.px
index 02234242..57095472 100755
--- a/tests/Test-c-partial.px
+++ b/tests/Test-c-partial.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-c-shorter.px b/tests/Test-c-shorter.px
index 432cab92..9823e746 100755
--- a/tests/Test-c-shorter.px
+++ b/tests/Test-c-shorter.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-c.px b/tests/Test-c.px
index 8c61eb06..2fb705f1 100755
--- a/tests/Test-c.px
+++ b/tests/Test-c.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-ftp.px b/tests/Test-ftp.px
index 8cef5a55..a98d745f 100755
--- a/tests/Test-ftp.px
+++ b/tests/Test-ftp.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use FTPTest;
 
diff --git a/tests/Test-nonexisting-quiet.px b/tests/Test-nonexisting-quiet.px
index 2766b5c5..04e11587 100755
--- a/tests/Test-nonexisting-quiet.px
+++ b/tests/Test-nonexisting-quiet.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-noop.px b/tests/Test-noop.px
index 14bd851c..1e0d1871 100755
--- a/tests/Test-noop.px
+++ b/tests/Test-noop.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-np.px b/tests/Test-np.px
index 28d13eec..f674193a 100755
--- a/tests/Test-np.px
+++ b/tests/Test-np.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px
index a2efe5eb..4e3fb206 100755
--- a/tests/Test-proxied-https-auth.px
+++ b/tests/Test-proxied-https-auth.px
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
-use warnings;
+
 use strict;
+use warnings;
 
 use WgetTest;  # For $WGETPATH.
 
diff --git a/tests/Test-proxy-auth-basic.px b/tests/Test-proxy-auth-basic.px
index e440a392..7b3a638f 100755
--- a/tests/Test-proxy-auth-basic.px
+++ b/tests/Test-proxy-auth-basic.px
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
diff --git a/tests/run-px b/tests/run-px
index ef38418c..0f8f2964 100755
--- a/tests/run-px
+++ b/tests/run-px
@@ -1,8 +1,8 @@
 #!/usr/bin/env perl
 
 use 5.006;
-use warnings;
 use strict;
+use warnings;
 
 use Term::ANSIColor ':constants';
 $Term::ANSIColor::AUTORESET = 1;