use strict;
my $fh = *DATA; # set the filehandle
my $pos = tell $fh; # store file pos
## Positive Matches
my @matched = grep {/void [s|S]et[\w]+\(\s*.*string/} <$fh>;
print "Found: " . @matched . "\n";
print "Matches:\n @matched";
# Reset the position to use again
seek $fh, $pos, 0;
## Negative Matches
my @not_matched = grep {$_ !~ /void [s|S]et[\w]+\(\s*.*string/} <$fh>;
print "Found: " . @not_matched . "\n";
print "Not Matched:\n @not_matched";
__DATA__
viod setChanName(const std::string & chanName) # Notice the misspelling
void setChanName(const std::string & chanName)
void setChanNameFont(const std::string & font)
void setOSDMessage(const std::string & osdMessage)
void setOSDMessageFont(const std::string & font)