- or download this
m Treat string as multiple lines. That is, change "^" and "$" from
matching the start or end of the string to matching the start or
end of any line anywhere within the string.
- or download this
$ perl -Mre=debug -wle'"ABC\nDEF" =~ m/C(?:$)^D/m'
Freeing REx: `","'
Compiling REx `C(?:$)^D'
...
Did not find anchored substr "CD"...
Match rejected by optimizer
Freeing REx: `"C(?:$)^D"'
- or download this
$ perl -Mre=debug -wle'"ABC\nDEF" =~ m/C(?:$)$\?^D/m'
Freeing REx: `","'
Omitting $` $& $' support.
...
D> <EF> | 11: END
Match successful!
Freeing REx: `"C(?:$)\n?^D"'