in reply to Calling a function in regex substitution
$str=~s/(iteration)(.*)/"<B>".uc($1)."$2 <\/B>"/eg; [download]
(Option 'e' makes the difference; it evaluates the substitution part as Perl code.)