You might be confusing the 'm' on the left of the regexp with the 'm' on the right.
The 'm' on the left is the match operator, if it was an 's' it would be the substitution operator. See "Regexp Quote-Like Operators" in
perlop.
However on the
right the 'm' and 's' are not operators but regexp modifiers, as explained by others above.