open(FILE,"text.txt"> $count=0; while(){ if($_ =~ /saravanan/mg){ $count++; } }