Typically, you would provide a LIST to grep, instead of a single scalar.
Conversely, if one only has one string to match, one wouldn't use grep.
my @matches = $string =~ /(?:class|struct)\s+[^:{;]+:[\w<>\s]+{/g;
In reply to Re^2: Finding C++ single inheritance occurrances
by ikegami
in thread Finding C++ single inheritance occurrances
by gibsonca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |