in reply to replace text with function ?

You want to look at the /e modifier for s/// in perlretut and perlop.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: replace text with function ?
by ikegami (Patriarch) on Jan 12, 2009 at 03:51 UTC
    A simple example:
    s/(\d+)/ sprintf('%03d', $1) /eg;
Re^2: replace text with function ?
by 2xlp (Sexton) on Jan 12, 2009 at 03:51 UTC
    that is it! thank you!