use strict; use WWW::Mechanize; #usage perl linkextractor.pl http://www.example.com/ > output.txt my $url = shift; my $mech = WWW::Mechanize->new(); $mech->get($url); my $status=$mech->status(); print $status." OK-URL request succeeded."."\n"; my @links = $mech->links; print STDOUT ($_->url, $/) foreach $mech->links;
In reply to Simple link extraction tool by Scott7477
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |