local $var;
is functionally equivalent to
my $saved_var = $var; ON_SCOPE_EXIT { $var = $saved_var; } $var = undef;
except local can be used in the middle of an expression (where it returns its arg as a lvalue).
Perhaps you want
local $A::variable = $A::variable;
In reply to Re: What's wrong with this local() ?
by ikegami
in thread What's wrong with this local() ?
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |