$read_set = new IO::Select(); # create handle set for reading $read_set->add($socket); # add the main socket to the set # Get a set of readable handles (blocks until at least one handle is ready) my ($rh_set) = IO::Select->select($read_set, undef, undef, 0);