Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Answer: How do I process one GET while I send another one?

( #691541=categorized answer: print w/ replies, xml ) Need Help??

Q&A > network programming > How do I process one GET while I send another one? contributed by zOrK

you could use ParallelUserAgent. or you could try using threads.

an example using threads could be something like:

#!/usr/bin/perl use threads; my @urls = qw(http://www.perlmonks.org http://www.perlguru.org); foreach my $url (@urls) { my $thread = threads->new(\&getter, $url); $thread->detach; } sub getter { # well, here is supposed to be the get stuff #which would fetch a site + or whatever you'd like #to do. #} ## Code untested

Comment on Answer: How do I process one GET while I send another one?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2014-09-30 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (375 votes), past polls