use strict; use warnings; use WWW::Mechanize; my $url = "file:///D:/webpage.html"; #my $url = "http://www.domain.com/webpage.html"; my $mech = WWW::Mechanize->new(); $mech->get( $url ); my @links = $mech->links(); foreach my $link (@links) { print "LINK: " . $link->url() . "\n"; print "DESCRIPTION: " . $link->text() . "\n"; }
In reply to Re: How do I parse links out of a web page
by tokpela
in thread How do I parse links out of a web page
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |