in reply to Re: one line regex eating CPU
in thread one line regex eating CPU

this ikegami's advice seems to be better than mine - don't reset the regex-engine.

Replies are listed 'Best First'.
Re^3: one line regex eating CPU
by ikegami (Patriarch) on Jun 23, 2006 at 20:19 UTC

    Hum? Yours "resets the regex-engine". Mine doesn't. How can you say we gave the same advice?

    >perl -wle "$_='bacada'; print pos while /a/g" 2 4 6 >perl -wle "$_='bacada'; print pos while s/a//" Use of uninitialized value in print at -e line 1. Use of uninitialized value in print at -e line 1. Use of uninitialized value in print at -e line 1.
      I know; I thought I made that clear? ikegami's advice seems to be better than mine - "don't reset the regex-engine". clearer now?
        The original text of your node claimed "Yours does too", meaning there was another one that didn't reset. Sorry, I incorrectly assumed you meant yours.