in reply to lwp-download mod ?

Does it "hang" in the middle of a transfer? If so, try setting $ua->timeout. Note that it's initial value is 180 seconds.

Also, I would organize your code like this:

use File::Temp; my ($FILE, $PATH) = File::Temp::tempfile(DIR => "/some/directory"); my $res = $ua->request(HTTP::Request->new(GET => $url), sub { print $FILE $_[0]; ...update transfer speed statisics... }); close($FILE); if ($res->is_success) { # determine new name from $res rename($PATH, ...new path name...); } else { unlink $PATH; }

Replies are listed 'Best First'.
Re^2: lwp-download mod ?
by Anonymous Monk on Jun 13, 2008 at 20:13 UTC
    That did the trick...thanks for the tip also :)