Tengo el siguiente script:
open (URLS, 'urls3.txt');
my @urls = <URLS>;
chomp @urls;
close(URLS);
open (PROXY, 'proxy.txt');
my @proxy = <PROXY>;
chomp @proxy;
close(PROXY);
for (my $i = 0; $i < @urls; $i++) {
print $urls,"::::"," PROXY: ",$proxy,"\n";
my $ua = LWP::UserAgent->new;
$ua->proxy(, "http://$proxy");
$ua->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)");
$ua->timeout(10);
my $req = HTTP::Request->new(GET => $urls);
$req->content_type('application/x-www-form-urlencoded');
my $response = $ua->request($req);
$result = $response->code();
open(ARCHIVO,">>libros.txt");
binmode ARCHIVO;
print ARCHIVO $result," ",$response->message( ...