my $links = new IO::Select(); $links->add($mcserver); $links->add(\*STDIN); ... while (my @allhandles = $links->select($links, undef, $links) {