in reply to using s/ to not only substitute but also modify text

Yes, you want to use the /e modifier to the substitution like:

$foo =~ s/(123)/function($1)/e;

/J\

Replies are listed 'Best First'.
Re^2: using s/ to not only substitute but also modify text
by Joost (Canon) on Jul 26, 2004 at 22:22 UTC

      Ooops, yes fixed now