Some variables don't seem to be checked by the strict pragma, eg. $a, $b
Perl versions tested: 5.004_04 (Solaris), 5.004_64 (Windows NT)
$a and $b are special (for use in sort() code).
Matthias Urlichs | noris network GmbH | firstname.lastname@example.org | ICQ: 20193661
The quote was selected randomly. Really. | http://www.noris.de/~smurf/
The number of computer scientists in a room is
inversely proportional to the number of bugs in their code.
Juerg Schulthess .`'???.
"I date this girl for two years -- and then the nagging
starts: "I wanna know your name...""</pre>
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one place.
Yahoo! Shopping: http://shopping.yahoo.com
That's a feature. 'use strict' doe"sn't check for '$a' nor '$b' so you can
use them in 'sort' without complain.
True enough. But given the frequency with which this comes up, it's
certainly a bug that it's not documented.
Patch for perl5.005_62 attached.
PS Juerg: you don't need to do anything to close a bug report.
We just stop discussing it when we get sufficiently bored ...
--- ./lib/strict.pm.orig Wed Dec 1 14:32:44 1999+++ ./lib/strict.pm Wed Dec 1 14:34:21 1999@@ -56,6 +56,9 @@
The local() generated a compile-time error because you just touched a global
name without fully qualifying it.
+Because of their special use by sort(), the variables $a and $b are+exempted from this check.+
=item C<strict subs>
This disables the poetry optimization, generating a compile-time error if
End of patch
Migrated from rt.perl.org#1841 (status was 'resolved')
Searchable as RT1841$
The text was updated successfully, but these errors were encountered: