#!/Perl/bin/perl.exe print "content-type: text/html \n\n"; $projectA = (OPEN, c:\projecta.txt); $projectB = (OPEN, c:\projectb.txt); $MatchCount = 0; @sentencesA = split(/\./, $projectA); @sentencesB = split(/\./, $projectB); $arrLenA = scalar @sentencesA; $arrLenB = scalar @sentencesB; for ($z=0;$z<=$arrLenA;$z++){ for ($i=0;$i<=$arrLenB;$i++){ if $sentencesA[$i] == $setencesB[$z]{ $MatchCount++; } } } return $MatchCount;