foreach $sourceLine (@SourceData) { print "$sourcfeLine\n"; print "$functionName\n"; print "\n"; if ($functionName =~ /$sourceLine/) {$counter++;} }