in reply to Re: /m pattern matching modifier
in thread /m pattern matching modifier

Thanks for the quick response.
I can understand how /s modifier changes other metacharacter's behavior, but still have difficulty to under the logic of /m.
My initial testing code: "AAC\nGTT"=~/^.*$/m only find the first match (thanks to the second perlmonk who responsed to my initial question). Then I tested "AAC\nGTT"=~/^.*$/mg, which still gave AAC. Since .* with /m won't match \n sign, the second part of the string GTT should fit to the regular expression ^.*$ according to /m definition.
Interestingly, "\nGTT\n"=~/^.*$/m gave nothing,
while "GTT\n"=~/^.*$/mg shows GTT.
Thanks