in reply to regexp match count
The first match operator is called in list context. m//g in list context returns a list of all the captured strings or a list of all the matched strings if there are no captures.
The second match operator is called in scalar context. m// (with or without 'g') in scalar context returns true if a match occurred or false otherwise.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regexp match count
by ramprasad27 (Sexton) on Oct 09, 2011 at 06:07 UTC |