in reply to Re: Problem in counting the occurrences of a string in a text file
in thread Problem in counting the occurrences of a string in a text file

OK, a typo in the previous reply.

$conto++ if $value =~/(($key\/$key\/S)\s{0,2}(\.\*)\s{0,2}(con\/con\/E +)\s{0,2}(\.\*)\s{0,2}($value\/$value\/S))/is){

should read

$conto++ if $text =~/(($key\/$key\/S)\s{0,2}(\.\*)\s{0,2}(con\/con\/E) +\s{0,2}(\.\*)\s{0,2}($value\/$value\/S))/is){