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

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.

Replies are listed 'Best First'.
Re^4: one line regex eating CPU
by shmem (Chancellor) on Jun 23, 2006 at 20:26 UTC
    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.