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

RE: [ID 19991114.001] dangerous behavior from local

Thread Previous | Thread Next
From:
Moore, Paul
Date:
November 16, 1999 02:36
Subject:
RE: [ID 19991114.001] dangerous behavior from local
Message ID:
714DFA46B9BBD0119CD000805FC1F53BDC390B@UKRUX002.rundc.uk.origin-it.com
From: Ronald J Kimball [mailto:rjk@linguist.dartmouth.edu]
> > 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?

Paul.

Thread Previous | Thread Next


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