http://www.perlmonks.org?node_id=69688

heidkamp has asked for the wisdom of the Perl Monks concerning the following question: (regular expressions)

I want to replace text with the results of a subroutine, ie
s/SUM(\d*)/sum($1)/g sub sum()
using (?{CODE}) is 0 width (no replacement), and I can't get it to work in the replacement section anyway.
Any ideas?

Originally posted as a Categorized Question.