while ( print(STDERR "[", pos($content), "]"), # DEBUG $content =~ m%pattern%gs ) { ... } [download]
In reply to Re: Regex infinite loop? by ikegami in thread Regex infinite loop? by Ninth Prince