On 1 Jul 2003 at 10:30, Ronald J Kimball wrote:
> On Tue, Jul 01, 2003 at 05:15:09PM +0300, Vladi Belperchinov-Shabanski wrote:
>
> > my $id = 1 if $_ == 3;
[...]
> This was an accidental feature that is now kept for backwards
> compatibility, because some programmers have used it to create static
> variables. It's best to avoid it, however.
It is undefined behavior [even though it works currently in every version
of Perl] and so it IS best to avoid it. What I don't understand is why
the powers-that-be provide so much resistance to putting in a simple
'static' declaration that would work the same way, only be defined-and-
legal. e.g.,:
sub x
{ static $vbl ;
[...]
Oh well, I guess re-opening that wound isn't much fun...
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
mailto:[EMAIL PROTECTED] Pearisburg, VA
--> Too many people, too few sheep <--