#!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request; my $ua = LWP::UserAgent->new; $ua->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"); my $timeout = 30; my $url = 'http://localhost/log.txt'; print "Downloading log: " ,$url , "\n"; my $req = HTTP::Request->new(GET => $url); #$req->header(¿?¿?¿?¿?¿?); my $response = $ua->request($req); my $content = $response->content(); open SOURCE, '>>', 'log.txt' or die $!; print SOURCE $content;