I have a line of perl like so:
perl -e '$_ = "a"; while (m/(?:\G|^)(a)/g) {print "[$1]\n";}'
but when I upgrade from 5.005 to 5.6.0, everything hangs.
How can this happen, and why was this bug installed into Perl?
Is it an attempt to punish people for using regex's styles
that are supposedly depricated or something? I would think
that most old perl code should also work on the new perl,
and, at least, any pattern match with a "g" option should not
cause an infinite loop, eh?
BTW, I just changed to this and it works on both perls:
perl -e '$_ = "a"; while (m/\G(a)/g) {print "[$1]\n";}'