tr returns the number of translations it has done - so you can use code like:
$count = $text =~ tr/"/"/;to get the number of double quotes in $text.
I can't help wondering, however, why you're trying to reinvent HTML::Parser. What does that module not do that you need?
--Perl Training in the UK <http://www.iterative-software.com>
In reply to Re: parsing HTML
by davorg
in thread parsing HTML
by eod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |