use File::Find;
use HTML::LinkExtor;
my @files;
find(
{
wanted => sub { -f && /\.ht/ && push @files, $File::Find::name }
},
@ARGV
);
my $p = HTML::LinkExtor->new(
sub {
my ( $tag, %attr ) = @_;
return if $tag ne 'a';
print $attr{href}, "\n";
}
);
$p->parse_file($_) for (@files);