in reply to Fastest way to download many web pages in one go?
please correct mistakes if you notice anythinguse LWP::Simple; $a = get("http://perlmonks.org/index.pl?"); (getLink($1)) while ($a =~s/a href=\"(http:\/\/.+)\"//); sub getLink{ if($pid = fork()){ $_ = shift; $filename = $& if /(?<=http:\/\/)[\w+|\.|\d+]+/; open OUT,">pages/$pid-$filename" or die $!; print OUT get($_); close OUT; exit(0); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Fastest way to download many web pages in one go?
by davido (Cardinal) on Oct 13, 2013 at 01:54 UTC | |
by Lennotoecom (Pilgrim) on Oct 13, 2013 at 04:45 UTC |