You're confused about /s and /m. The ONLY thing the /s modifier does is allow . to match newlines. The ONLY thing the /m modifier does is allow ^ to match after newlines and $ to match before newlines.
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart