in reply to Re: LWP and TokeParser
in thread LWP and TokeParser

Sorry, it should be :
use HTML::TokeParser; use LWP::Simple; my $stuff = get('http://some_url.com); my $file = HTML::TokeParser->new("$stuff"); while ( my $token = $file->get_tag("a")) { my $url = $token->[1]{href} || "-"; my $text = $file->get_trimmed_text("/a"); print "<a href=$url>$text</a><br>"; }

And why can't I edit my original post as I usually can ??
oh well, thanks in advance!

Replies are listed 'Best First'.
Re: Re: Re: LWP and TokeParser
by kwoff (Friar) on Jan 11, 2002 at 03:04 UTC
    Re-read `perldoc HTML::TokeParser`. you want HTML::TokeParser->new(\$stuff).
      Thanks!