dear all,
I didn't understand how to use the module HTML, but I need to count how
many tags of several types appear in a web page and so I wrote this
script.
Someone can tell me why this one doesn't work?
%tags = ("paragraph" => "p",
"list_o" => "ol",
"list_no" => "ul",
well, the name of the sub is correct. I translated it and I add an
error only in my e-mail.
alladr
while(<$filename>)
{
foreach $var (keys(%tags))
{
$$var += count_it($$var, $var, $tags{$var},$_);
}
}
foreach $va
--- Adriano Allora <[EMAIL PROTECTED]> wrote:
> I didn't understand how to use the module HTML, but I need to count
> how
> many tags of several types appear in a web page and so I wrote this
> script.
>
> Someone can tell me why this one doesn't work?
>
> %tags = ("paragraph" => "p",
>
--- Ovid <[EMAIL PROTECTED]> wrote:
> First, I would suggest that you're trying to count two different
> things, tags and attributes. You may wish to separate them. The
> following code will do what you want. It uses the
> HTML::TokeParser::Simple module to make this relatively easy to read