This above string is in a file. I want to match the "saravanan" string. the count should be 3. I wrote a code like"a student name is sa ravanan. saravanan is studying 3rd standard. i am go with sara vanan"
but the above program match only "saravanan" not other saravanan which is broke by new lineopen(FILE,"text.txt"> $count=0; while(<FILE>){ if($_ =~ /saravanan/mg){ $count++; } }
In reply to Re^2: reading file
by saranperl
in thread reading file
by saranperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |