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 | |
In reply to Re: Find and Remove Link
by blue_cowdawg
in thread Find and Remove Link
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |