can_read ( [ TIMEOUT ] ) Return an array of handles that are ready for reading. "TIMEOUT" is the maximum amount of time to wait before returning an empty list, in seconds, possibly fractional. If "TIMEOUT" is not given and any handles are registered then the call will block. #### #!/usr/bin/perl use IO::Select; open $fh, '/tmp/test_file'; $sel = new IO::Select( $fh ); while(@ready = $sel->can_read) { print "looping\n"; foreach $h (@ready) { if ($h == $fh) { print "reading from fh\n"; while ($buf = <$h>) { print $loop++," $buf"; } } else { print "handle is unknown\n"; } } }