in reply to Re^2: Why is "any" slow in this case?
in thread Why is "any" slow in this case?
So the regex engine doesn't waste any time updating globals that may not even get used. Instead the cost is deferred until the global is accessed, and incurred every time it is accessed because that's how magic works.