Help for this page

Select Code to Download


  1. or download this
    my $parser = HTML::TokeParser::Easy->new( $some_html );
    
    ...
        next if ! $token->is_text;
        print $token->return_text;
    }
    
  2. or download this
    sub get_token {
        my $self = shift;
    ...
        bless $token, $class;
    }
    # create appropriate methods...
    
  3. or download this
    while ( my $token = $parser->get_token ) {
        # This prints all text in an HTML doc (i.e., it strips the HTML)
        next if ! $parser->is_text( $token );
        print $parser->return_text( $token );
    }
    
  4. or download this
    ##################
    package HTML::TokeParser::Easy;
    ...
            die "No such method: $AUTOLOAD";
        }
    }