Thread HTML::LinkExtor: mein Testscript haut nicht hin :( (9 answers)
Opened by RPerl at 2007-07-01 14:50

RPerl
 2007-07-01 14:50
#78092 #78092
User since
2006-11-26
384 Artikel
BenutzerIn

user image
Hi,

hab mal eine Frage - rein Interesse halber:

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use strict;
use warnings;
use LWP::Simple;
use HTML::LinkExtor;

my $url = 'http://www.perl-community.de/';
my $content;

sub connect {
    $content = get($url);
    return $content;
}


&connect();

my $p = HTML::LinkExtor->new();
$p->parse_file($content);

if($p->links) { print $p->links; }


Kann das Modul nur aus einer File die Links extrahieren?
Oder warum haut das nicht hin?!

Danke!

rPerl

View full thread HTML::LinkExtor: mein Testscript haut nicht hin :(