in reply to This regex surprised me

This is documented in perl5101delta, under "Other Incompatible Changes":

This one is actually a change introduced in 5.10.0, but it was missed from that release's perldelta, so it is mentioned here instead.

A bugfix related to the handling of the /m modifier and qr resulted in a change of behaviour between 5.8.x and 5.10.0:

# matches in 5.8.x, doesn't match in 5.10.0 $re = qr/^bar/; "foo\nbar" =~ /$re/m;