我怎样才能使 HTML::Clean 模块在这个 perl 脚本中工作。
#!/usr/bin/env perl
use strict;
use warnings;
require LWP::UserAgent;
open FH, "<", "text.txt";
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
foreach my $line (<FH>) {
my $response = $ua->get($line);
my $h = new HTML::Clean(\$response);
if ($response->is_success) {
print $response->decoded_content;
}
else {
die $response->status_line;
}
}
close FH;