http://qs321.pair.com?node_id=1067585


in reply to Perl RE; how to capture, and replace based on a block?

To minimize unhelpful replies here, you should probably do something like this:
  1. Add "use strict;" to the top of your code.
  2. Add "my ();" right after it.
  3. Keep adding "VAR," between the parens in #2 as long as Perl complains about 'Global symbol "VAR"...'
Someone should probably write an Acme:: module to do this automatically.