On Tue, Jan 25, 2022 at 03:59:58PM +0000, hv@crypt.org wrote: > It would probably be useful to have examples where that distinction > makes a difference Aren't we talking about the different between 1) container localisation: my $x = 1; my $rx = $x; local $x = 2; print $$rx, $x; # prints 2,2 2) value localisation: my $x = 1; my $rx = $x; local $x = 2; print $$rx, $x; # prints 1,2 local() normally does container localisation. I think for consistency it should do that with lexical vars too. i.e. { local $lex = $foo; ... } should be equivalent to for $lex ($foo) { ... } -- Modern art: "That's easy, I could have done that!" "Ah, but you didn't!"Thread Previous | Thread Next