in reply to Re: replace text with function ?
in thread replace text with function ?

A simple example:
s/(\d+)/ sprintf('%03d', $1) /eg;