You say that you are trying to count parentheses but you are using the patterns /'\('\d+/ and /'\)'\d+/ which count the string consisting of a parenthesis surrounded by single quotes followed by one or more numerical digits.
If you just want to count parentheses then use:
my $l_count = $testString =~ tr/(//; my $r_count = $testString =~ tr/)//;
In reply to Re: IT's not counting...
by jwkrahn
in thread IT's not counting...
by Dwood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |