in reply to RE: REGEX: muliple search and replace
in thread REGEX: muliple search and replace

I'm not necessarily suggesting you do this, but if your variables are, say, $name, $email, etc. (i.e. they aren't in hashes) you can use symbolic references:
s/<!--var (\w+)-->/${"main::$1"}/eg
(so <!--var foo--> would be replaced by the contents of $foo.)

The only real advantage to punk music is that nobody can whistle it.