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

Line 3: " # matches both foo": are you sure?
C:>perl -e "$s = \"foo\nfoot\nroot\";($y) = $s =~ /^foo/gm;print $y;" foo
  • Comment on Re^2: example of 'm / / m' related example and compare to 'm / / s'
  • Download Code

Replies are listed 'Best First'.
Re^3: example of 'm / / m' related example and compare to 'm / / s'
by ikegami (Patriarch) on Nov 28, 2011 at 18:29 UTC
    Yes, but not in the same pass.
    >perl -E"say join ',', qq{foo\nfoot\nroot} =~ /^foo/gm;" foo,foo