develooper Front page | perl.perl5.porters | Postings from November 1999

RE: [ID 19991114.001] dangerous behavior from local

Thread Previous | Thread Next
Moore, Paul
November 16, 1999 02:36
RE: [ID 19991114.001] dangerous behavior from local
Message ID:
From: Ronald J Kimball []
> > It looks to me as if it did localize $/ -- but only _after_ 
> > storing undef into it. Oops!
> > 
> That was my guess, too, but further tests don't seem to be 
> consistent with that conclusion:

Could it be that Perl is
  1. Storing undef into $/
  2. Looking at the local()
  3. "Realising" that, as $/ is undefined, it is a new variable
     and so localising is "unnecessary", therefore not doing it.

Ie, could it be an optimiser bug?


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