in reply to Re^3: Replacing duplicate string
in thread Replacing duplicate string

I'm sure it compiles just fine, and it does actually run, but I would have to say that you didn't actually run that code on your end, otherwise you would have seen that it doesn't run 'just fine'.

You need to move the declaration of $do_mod outside of the loop for it to run just fine.

Replies are listed 'Best First'.
Re^5: Replacing duplicate string
by apok (Acolyte) on Apr 16, 2009 at 18:33 UTC
    Fair point. Grabbed the wrong block of test text, so gave the appearance of correct output text.

    Another point: one might find better reception to suggestions sans snark.
    -----
    "Ask not what you can do for your country. Ask what's for lunch."
    -- Orson Welles