Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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

by zOrK (Initiate)
on Jun 11, 2008 at 19:47 UTC ( #691541=categorized answer: print w/replies, xml ) Need Help??

Q&A > network programming > How do I process one GET while I send another one? - Answer 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(; 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

Log In?

What's my password?
Create A New User
and dust plays in a shaft of sunlight...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2018-03-18 19:39 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.