# Snippet One: select() while (my ($read) = IO::Select::select($clients, undef, undef, undef) ) { for my $client (@$read) { # handle this } } # Snippet Two: can_read() while (my @read = $clients->can_read()) { for my $client (@read) { # handle this } }