in reply to Extracting URL from HTML - but unfamiliar with OO module syntax
I don't think you need to pass a file handle to the parse_file accessor,passing a filename will do. Then you need to use the links accessor to get all the links in the htm file -
foreach $file (@files) { if ($file =~ /^(.*)htm/i){ print FileDOut "$file\n"; my $extor = HTML::SimpleLinkExtor->new(); $extor->parse_file($file); my @all_links = $extor->links; print FileDOut join "\n",@all_links; } }
|
|---|