On Mon, Mar 27, 2006 at 05:26:48PM +0200, Yuval Kogman wrote: > Hi, > > my $x = 5; > { > temp $x; > # is $x 5 or undef? > } > # $x is definately 10
How did $x become 10?!?!? :-) > I think it should be 5 inside, because it makes it easy to write > things like: I think that if C<temp> is the new C<local>, then immediately after the C<temp $x> line, $x should hold whatever flavor of undef is appropriate. > > my $x = 5; > { > temp $x++; > # $x is 6 > } > # $x is 5 again > > and otherwise pretty much DWIMs, except from a historical > perspective. Is there some reason we're huffmannizing my $x = 5; { temp $x = $MY::x + 1; # or whatever the proper syntax is # $x is 6 } $x = 5; ?? Can you elaborate an example that would show this to be a boon? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]