All pastes #524799 Raw Edit

Untitled

public text v1 · immutable
#524799 ·published 2007-05-31 05:07 UTC
rendered paste body

sub  get_alinks {
my $p = HTML::LinkExtor->new(\&cb);
my $alinks_domain = $_[1];
my @flinks;
    sub cb {
        my($tag, $type,  %links) = @_;

                return if $tag ne 'a';
               # if ("@{[%links]}" !~ /^http:\/\//) {
               # push @flinks, "http://$alinks_domain@{[%links]}\n";
               # }
                # else {
                push @flinks, @{[%links]};
                 #        }


          }
    $p->parse_file(shift || die "Cant complete a_links subroutina : $!");

return @flinks;


}