in reply to (Regex Quiz) Multi-line Matching

I wasn't able to answer this instantly.

I did find that this helps:

perl -debug DB<1> $string= "...foo\nbar..."; DB<2> x $string =~ /(foo$bar)/m; DB<3> x $string =~ /(foo$^bar)/m; DB<4> x $string =~ /( foo$ ^bar )/mx;
note the added parens.

You may also want to add use strict and turn on warnings (though those don't work very well when using the debugger like above).

You may also be interested in seeing how backslashes change things.

        - tye (but my friends call me "Tye")