develooper Front page | perl.perl5.porters | Postings from July 2001

RE: [ID 20010726.023] $a and $b in strict pragma

Thread Previous
Brent Dax
July 26, 2001 13:02
RE: [ID 20010726.023] $a and $b in strict pragma
Message ID:
>The following does not generate any warning of undeclared variables:

>use strict;
>$a = "foo\n";
>$b = $a;


>This is perl, version 5.005_02 built for sun4-solaris

It's a feature, not a bug.  :^)  No, really.  $a and $b are used in sort
routines, so having them locked out by C<use strict> is a Bad Thing.  (In
general, try not to use $a and $b for this reason, and because you may not
be able to access them when you want to if you do.)

--Brent Dax

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About