You want to use the 'e' modifier to the regex: s/something/somefunction(@somearguments)/e which replaces by the result of the code in the replace part which is then considered a Perl expression. (See perlretut or perlre for more info.)
Hope this helps, -gjb-
In reply to Re: replacing text with a function
by gjb
in thread replacing text with a function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |