my $links = new IO::Select(); $links->add($mcserver); $links->add(\*STDIN); ... while (my @allhandles = $links->select($links, undef, $links) { #### while (my @allhandles = $links->select($links, undef, $links) { #### while (my @allhandles = IO::Select::select($links, undef, $links) { #### if (sysread $handle, $command, 1024) { ... do stuff } else { ... client went away...handle it. }