in reply to
loop/substitution problem
Use a cache-hash.
s/(?<!\\)(\$\w+)(?![[{\w])/$rep{$1} ||= rvg()/ge;
[download]
That way, "$foo" always gets replaced by the same text.
japhy
--
Perl and Regex Hacker
Comment on
Re: loop/substitution problem
Download
Code
In Section
Seekers of Perl Wisdom