in reply to Text comparisons
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
|
|---|