in reply to Find and Remove Link
Take a look at HTML::TokeParser's man page. There is an example there that might help you.
That is the example verbatum. If you modify the while loop you probably can accomplish what you are after.use HTML::TokeParser; $p = HTML::TokeParser‐>new(shift││"index.ht +ml"); while (my $token = $p‐>get_tag("a")) { my $url = $token‐>[1]{href} ││ "‐ +"; my $text = $p‐>get_trimmed_text("/a"); print "$url\t$text\n"; }
| Peter L. Berghold | Brewer of Belgian Ales |
| Peter@Berghold.Net | www.berghold.net |
| Unix Professional | |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Find and Remove Link
by Anonymous Monk on Jul 21, 2003 at 21:12 UTC |