in reply to Re: Global regex giving up too soon
in thread Global regex giving up too soon

I think you are suffering a little confusion. perlre documents everything to do with compiling or matching regexes, including all the applicable flags (i, m, s, x). All the other flags have nothing to do with compiling or matching a regex; instead they affect the operator that is using the regex, and are documented in perlop, which says:
In scalar context, each execution of m//g finds the next match, returning true if it matches, and false if there is no further match. The position after the last match can be read or set using the pos() function; see perlfunc/pos. A failed match normally resets the search position to the beginning of the string, but you can avoid that by adding the /c modifier (e.g. m//gc). Modifying the target string also resets the search position.
Note that //c is only documented to work with m//g, and even then only in scalar context (though it actually works even in list context).

Update: perlre says it better than I did. Almost at the very top:

For reference on how regular expressions are used in matching operations, plus various examples of the same, see discussions of m//, s///, qr// and ?? in perlop/"Regexp Quote-Like Operators".

Matching operations can have various modifiers. Modifiers that relate to the interpretation of the regular expression inside are listed below. Modifiers that alter the way a regular expression is used by Perl are detailed in perlop/"Regexp Quote-Like Operators" and perlop/"Gory details of parsing quoted constructs".

Replies are listed 'Best First'.
Re: Re: Re: Global regex giving up too soon
by Wassercrats (Initiate) on Jan 21, 2004 at 20:47 UTC
    I was looking for /g related stuff. If /c isn't explained in perlre near the /g information, then a referral to /c information should be given. I don't read any document in its entirety when I look this stuff up, especially long technical ones, and I like indexing and references that cater to the lazy. Whoever wrote perlretut had the right idea, though the explanation wasn't idiot-proof enough for me.