in reply to Re: Just Another Thread Hacker
in thread Just Another Thread Hacker
I lost five strokes in the beautification. ;) The biggest gain was in making the sub an anonymous inline sub rather than a named one.use threads;;;use IO::Socket;;;@t=map threads->create(sub{$o= IO::Socket::INET->new(qw(PeerAddr perlmonks.org PeerPort 80)) ;print $o "GET /?node_id=$_[0]&displaytype=xml HTTP/1.0\n\n"; local$/;(<$o>=~/title="(\w+\s)/)},$_),9655,6352,297065,138903 ;print$_->join for@t;print$/
Great japh. I always like these ones that grab things off the net.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Just Another Thread Hacker
by benn (Vicar) on Oct 09, 2003 at 11:11 UTC |