Right, perl keeps a stack of pads per sub, but each sub only has a single pad in play at once. What I was talking about is something like:
sub foo {
my $bar;
{
my $bar;
{
my $bar;
}
}
}
While there are three blocks, and three $bars in there, there's still only one pad. Leaving the inner blocks doesn't exit any pads, nor does it clean any pads up. (The compiler plays some magic games to determine which $bar in the sub pad is in effect at any particular line of the sub) | [reply] [d/l] |