To minimize unhelpful replies here, you should probably do something like this:
in reply to Perl RE; how to capture, and replace based on a block?
Someone should probably write an Acme:: module to do this automatically.
- Add "use strict;" to the top of your code.
- Add "my ();" right after it.
- Keep adding "VAR," between the parens in #2 as long as Perl complains about 'Global symbol "VAR"...'