One further worry of mine concerns the action of %MY:: on unintroduced
variables (especially the action of delete).
my $x = 100;
{
my $x = (%MY::{'$x'} = \200, $x+1);
print "inner=$x, ";
}
print "outer=$x";
I'm guessing this prints inner=201, outer=200
As for
my $x = 50;
{
my $x = 100;
{
my $x = (delete %MY::{'$x'}, $x+1);
print "inner=$x, ";
}
print "middle=$x, ";
}
print "outer=$x";
If delete 'reexposes' an outer version of that variable, then I'd speculate
the output would be
inner=51, middle=50, outer=50
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Dan Sugalski
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Ken Fox
- Re: What's up with %MY? Dan Sugalski
- RE: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Ken Fox
- RE: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Dan Sugalski
- RE: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? David L. Nicol
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Bart Lateur
- Re: What's up with %MY? Dave Mitchell
- Re: What's up with %MY? Bryan C . Warnock
- Re: What's up with %MY? Dave Mitchell
- RE: What's up with %MY? Garrett Goebel
- Re: What's up with %MY? Dan Sugalski
- Re: What's up with %MY? Ken Fox
