http://www.perlmonks.org?node_id=1101687


in reply to Re^4: Turning on regexp debugging at runtime
in thread Turning on regexp debugging at runtime

Thanks. I misunderstood DEBUG_REGEX.

Unfortunately, the actual situation is very complicated. There are literally hundreds of regexps, and I'd like to be able to debug any one of them at any time. Also, they are called multiple times, so I might only be interested in the 4th time that a regexp is called.

Unfortunately, the "use regexp" pragma is applied when the regexp is created... I want something to turn debugging on when a regexp is matched against.

It's really not that big of a deal... I can workaround it by simply ignoring a lot of unwanted output. I was just hoping for something a little cleaner during debugging time.