|Just another Perl shrine|
RE: lexical weirdness(?)by dchetlin (Friar)
|on Oct 25, 2000 at 19:57 UTC||Need Help??|
As the anonymous but wise monk pointed out above, this is a case of the `my $x if 0' feature. For some reading material on this, start here and look through some of the p5p threads on it.
I doubt this feature will go anywhere for Perl 5 at least, because it doesn't seem to cause any problems and allows you to do something (create a static variable) which you can't really do any other way.
But it does mean you should be careful when declaring lexicals.