Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

What's wrong with HTML::TokeParser::Simple?

by Ovid (Cardinal)
on Mar 20, 2006 at 23:34 UTC ( [id://538087]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use HTML::TokeParser;
    my $parser = HTML::TokeParser->new( \$src );
    
  2. or download this
    use HTML::TokeParser::Simple;
    my $parser = HTML::TokeParser::Simple->new( \$src );
    
  3. or download this
    my %meta;
    my $htm2 = HTML::TokeParser->new( \$src );
    while (my $token = $htm2->get_token) {
            next if $token->[1] ne 'meta' && $token->[0] ne 'S';
            $meta{$token->[2]{name}} = $token->[2]{content};
    }
    
  4. or download this
    my %meta;
    my $htm2 = HTML::TokeParser::Simple->new( \$src );
    while (my $token = $htm2->get_token) {
            next unless $token->is_start_tag('meta');
            $meta{$token->get_attr('name')} = $token->get_attr('content');
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://538087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-09-10 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.