in reply to Re: Re: Infinite loop regexin thread Infinite loop regex
For that matter, if you are grouping all the matches at once, why bother with the temporary string?
for ($obj->method =~ /pat(keep)/g) { print $count++, " $_\n"; # etc. } [download]
--rjray