selectfile#

Wait until a handle has input, for at most delay seconds.

Synopsis#

my $ready = Term::ReadKey::selectfile(\*STDIN, 0.25);

What you get back#

1 when the handle’s buffer already holds input, -1 when select() says the descriptor is readable (or fails), 0 when the time ran out. ReadKey and ReadLine call it for a positive timeout.