View Single Post
Old Aug 22nd, 2005, 4:44 AM   #2
prolog
Programmer
 
Join Date: Jul 2005
Location: Germany
Posts: 69
Rep Power: 4 prolog is on a distinguished road
Hi,

you'll have to use the operations IO:ocket provides for reading and writing. Check the man-page for that. Secondly to get an array of all sockets that are ready to write to call IO:ocket::can_write. This will return an array of all handles that are writable.

my @writers=$sel->can_write;
foreach my $cur (@writers){
# .....do sth
}

If it's just for learning do it that way. If not consider using POE.

So far ...
__________________
-= C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do succeed, you will blow away your whole leg. =- Bjarne Stroustrup
prolog is offline   Reply With Quote