http://qs321.pair.com?node_id=485475


in reply to Re: New to perl: IO Select question :(
in thread New to perl: IO Select question :(

I don't think you're right on this one. His code works fine as long as you just replace

my @rhSet = IO::Select->select($readSet, undef, undef, 0); foreach my $rh (@{$rhSet[0]}) {

with (as in your example)
my @rhSet = IO::Select->select($readSet, undef, undef, 0); foreach my $rh (@{$rhSet[0]}) {

The

my $connection = $sock->accept(); $readSet->add($connection);
you added are not needed, and I'd personally consider doing that more harmful than useful.

I also don't understand your comment about $sock not being an "active channel". After you create a server socket you can add it to the read set perfectly fine, and the select will return the socket when there's a connection to accept.