#!/usr/bin/perl -w use LWP::Simple; use Fatal 'open'; open HTML, ">monastery_gates.html"; my $total = 0; print STDERR "\nconnecting..."; getstore "http://www.perlmonks.org", sub { my($chunk) = @_; print STDERR "\r", " " x 20 unless $total; $total += length $chunk; print STDERR "\r$total bytes"; print HTML $chunk; }; print STDERR "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using LWP::Simple with a callback (progress indicator)
by barrd (Canon) on Sep 16, 2003 at 11:32 UTC | |
by bart (Canon) on Sep 16, 2003 at 11:36 UTC | |
by barrd (Canon) on Sep 16, 2003 at 11:42 UTC |