Implement local. Per the documentation, local actually defines a global variable, pushes the current value on a stack and makes a new value during the execution of this block. Once the block is done, the old value is popped back off the stack. This way if you call a function, the new value is available to that function. Some code uses local *var, which declares $var, @var, %var, &var, and var all local at the same time.
Implement local. Per the documentation,
local
actually defines a global variable, pushes the current value on a stack and makes a new value during the execution of this block. Once the block is done, the old value is popped back off the stack. This way if you call a function, the new value is available to that function. Some code useslocal *var
, which declares$var
,@var
,%var
,&var
, andvar
all local at the same time.