in reply to Disambuating $ in (especially /m) regexps

/foo$.*^bar/ms - is this $. (the variable) or EOL followed by random stuff?

$ perl -E'say qr/foo$.*^bar/ms' (?^ums:foo*^bar)
It's the variable. Fixed:
$ perl -E'say qr/foo(?:$).*^bar/ms' (?^ums:foo(?:$).*^bar)