sulfericacid has asked for the wisdom of the Perl Monks concerning the following question:
I suppose I could write if ($p->get_tag("meta")) { and IF that was the proper meta call, it would parse all the tags it finds. Can someone show me a way to call each tag separately and store it in it's own string for later use?use HTML::TokeParser; $p = HTML::TokeParser->new(shift||"index.html"); if ($p->get_tag("title")) { my $title = $p->get_trimmed_text; print "Title: $title\n"; }
<meta name="copyright" content="Aaron Anderson"> <meta name="keywords" content="free, cheap, fun">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::TokeParser- Meta Tags
by broquaint (Abbot) on Nov 21, 2002 at 10:44 UTC | |
|
Re: HTML::TokeParser- Meta Tags
by LTjake (Prior) on Nov 21, 2002 at 12:20 UTC |