in reply to Re: example of 'm / / m' related example and compare to 'm / / s'
in thread PERL regex modifiers for m//

How can one compare two independent things?
It's not so hard:

Replies are listed 'Best First'.
Re^3: example of 'm / / m' related example and compare to 'm / / s'
by ikegami (Patriarch) on Dec 05, 2011 at 17:50 UTC

    //m causes ^ and $ to match at newlines in the middle of your string, while //s causes . to match newlines.

    You're comparing using /m to not using /m, and using /s to not using /s. You're not comparing /m to /s.

    Your river example compares the location of the rivers, but there's no common aspect of /m and /s to compare.

Re^3: example of 'm / / m' related example and compare to 'm / / s'
by ikegami (Patriarch) on Dec 05, 2011 at 17:56 UTC

    //m causes ^ and $ to match at newlines in the middle of your string, while //s causes . to match newlines.

    You're comparing using /m to not using /m, and using /s to not using /s. You're not comparing /m to /s.

    Your river example compares the location of the rivers, but there's no common aspect of /m and /s to compare.