Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can someone show me a quick example of how I could branch off and multi-process this to load more at once?
my @urls = qq("http://www.woot.com", "http://www.shopping.yahoo.com"); my %stored_data; foreach my $page (@urls) { my $source = get($page); $stored_data{$page} = $source; print "loaded and saved $page\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: forking/threads/running more than one command at once
by BrowserUk (Patriarch) on Oct 05, 2007 at 22:20 UTC | |
|
Re: forking/threads/running more than one command at once
by ikegami (Patriarch) on Oct 05, 2007 at 20:55 UTC | |
|
Re: forking/threads/running more than one command at once
by Corion (Patriarch) on Oct 05, 2007 at 21:16 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |