Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I've now made this much easier in HTML::SimpleLinkExtor 1.14:

    linktractor -f= > output.txt
    No need to work too hard, after all. :)
    • Thank you. Can you see any obvious snafu's in the following code?:

      use strict;
      use warnings;
      use HTML::SimpleLinkExtor;
      use WWW::Mechanize qw( );

      #usage linkextractor -f [] > output.txt

      my ($url) = @ARGV;

      my $mech = WWW::Mechanize->new();
      my $response = $mech->get($url);
            or die($response->status_line() . "\n");

      my $extor = HTML::SimpleLinkExtor->new();
      my @all_links = $extor->links;
      foreach my $elem (@all