in reply to Re: The story of a strange line of code: pos($_) = pos($_);
in thread The story of a strange line of code: pos($_) = pos($_);

No, it can't give an infinite loop, exactly because of the empty match rule.

As I noted in the very last paragraph in the post, resetting pos is not making this worse because we don't recall the main regexen from @toktab after we reset pos.