in reply to Re^4: Word Count and Match
in thread Word Count and Match

I see you're still using the /o modifier in:

if($word=~/($namecnt)/io){
Did you bother to read and understand my earlier reply?