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

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

Thread Previous
From:
Brent Dax
Date:
July 26, 2001 13:02
Subject:
RE: [ID 20010726.023] $a and $b in strict pragma
Message ID:
FJELLKOPEAGHOOODKEDPIEFACDAA.brentdax1@earthlink.net
>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
brentdax1@earthlink.net



Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About