Note that \b matches a "word boundary", which prevents matching on non-function names embedded in other "words" (including other function names). But it doesn't handle the problem where function names are mentioned in comments.foreach my $sourceLine ( @SourceData ) { if ( $sourceLine =~ /\b$functionName\b/ ) { $counter++; } }
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: Text comparisons
by QM
in thread Text comparisons
by ScarryJerry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |