Create your own stack without bothering with local()? It doesn't sound like it's doing what you want it to do, so, performance issues aside, why bother with it?
{ # start of block of variables private to function foo() my @stack; sub foo { my ($var) = shift; push(@stack, $x); $x=$var; # code involving foo() and $x goes here... $x=pop(@stack); } # end foo } # end block of variables private to function foo()
Just a thought...
--
Ytrew
In reply to Re: Examing local's stack
by Anonymous Monk
in thread Examing local's stack
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |