This is what I would do after 'Step 0':
If the variable does change during the run then pick a different function first. When you got the global state disentangled a bit it's a lot easier to reason about what this code is doing. Everything that's still using a global needs to be treated with very careful attention.
In reply to Re^2: Perl archeology: Need help in refactoring of old Perl code that does not use strict
by Monk::Thomas
in thread Perl archeology: Need help in refactoring of old Perl code that does not use strict
by likbez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |