s/pattern/{ eval doit() }/ #### doit()<&c>.

like $1,$2,$3 ...