>>>>> "MS" == Melvin Smith <[EMAIL PROTECTED]> writes:

  MS> At 12:32 PM 1/21/2002 -0500, Michael G Schwern wrote:
  >> On Sun, Jan 20, 2002 at 10:58:34PM -0800, Larry Wall wrote:
  >> > :     while( my $line = <FILE> ) {
  >> > :         ...
  >> > :     }
  >> >
  >> > That still works fine--it's just that $line lives on after the while.
  >> 
  >> This creeping lexical leakage bothers me.  While it might make the

  MS> "lives on", ... "creeping lexical", I feel the same way, we must find some
  MS> way to kill these... :)

well, larry looks at it differently and what he said on the cruise makes
sense. the bigger problems were firstly not supporting lexical tunneling
from the 'for my $foo' into the continue block. now that NEXT blocks are
inside the loop that is fixed. and secondly the rule about the for
variable being declare in the outer scope also solves the problem of
keeping that last value around after the loop (prematurely) exits. so
the lexical is not creeping out but being declared in the surrounding
and proper scope.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to