in reply to s/// only replacing most of the time...

I'd just like to point out that your comma adding logic is somewhat flawed. The following regexp from Friedl puts commas in a number without recursion...
s/(?<=\d)(?=(?:\d\d\d)+$)/,/g
It is only when you need to replace within what you substituted that you usually need recursive replacement...

                - Ant
                - Some of my best work - (1 2 3)

Replies are listed 'Best First'.
Re^2: s/// only replacing most of the time...
by mdunnbass (Monk) on May 29, 2007 at 15:27 UTC
    I appreciate the comment, but you are actually referring to the perlop perldoc. The bit with the commas was just an example of the only bit of that perldoc that had any mention of s/// not replacing all the time. Otherwise, it has nothing to do with my script.

    But I thank you for the effort and the consideration nonetheless.

    Matt