in reply to Re^4: Local $$_?
in thread Local $$_?
All you really needed was
then you copy/pasteprint "local \$$_ = \$$_;\n" for @listofvarnames;
local $blah = $blah; ...
Although it is not a perfect solution - it seems to be working.
The use of global variables is red flag. Your statement that "it seems to be working" also indicates that it doesn't come with a test suite, another red flag. I think now is a time to consider/plan to refactor this program.
|
|---|