PHP has a function in which the replacement of an RE match can be handled by the name of a given function. Does Perl have something similar? Should be. After all PHP calls these lots the PCRE functions.
In other words, I want to do this: =========================================== while(<>){ chomp; s/<\d\d\d\d>/my_convert_func(\1)/g; print; } ========================================== Here whatever is the return value of my_convert_func() is the replacement text for that particular match. - Sandip -- -------------------------------------------------------- Sandip Bhattacharya sandipb <@> bigfoot.com http://www.sandipb.net GPG/PGP: 0x08EB637C -------------------------------------------------------- ================================================ To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header. Check archives at http://www.mail-archive.com/ilugd%40wpaa.org