in reply to eval something using private copy of variables
Wouldn't you just do something like this:
eval { local ($var1, $var2, %hash1, %hash2); # do some junk }
By localizing your vars, you retain the global values while working on local copies.
The distinction being that 'my' creates a completely new variable in the block scope, while 'local' provides a local scope to a higher scope variable.
|
|---|