On Wed, Mar 20, 2002 at 09:59:35AM -0800, Larry Wall wrote: > > I should update y'all to my current thinking, which is that $_ is > always identical to the current topic, even if the topic is aliased to > some other variable. To get at an outer topic, you'd have to use the > same mechanism we'll use for redeclared lexicals: > > my $foo = $OUTER::foo; > > for @x { # aliases $_ > for @y -> $y { # aliases both $x and $_ > print $OUTER::_; > } > }
I rather like this compromise. It provides the desired behaviour of "always default to the current topic" and so eliminates the confusion between C<when> and other defaulting constructs. It also maintains the "$_ is default" concept, which is quite important to people, as earlier bits of this thread demonstrated. Allison