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.
In reply to Re: regexp match count
by ikegami
in thread regexp match count
by ramprasad27
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |