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 ...