#!/usr/bin/perl
$rin = $win = $ein = '';
vec($rin,fileno(STDIN),1) = 1;
$| = 1;
$win = $ein = $rin;
$timeout = 5;
($nfound,$timeleft) =
  select($rout=$rin, $wout=$win, $eout=$ein, $timeout);
print "nfound $nfound timeleft $timeleft rout $rout wout $wout eout $eout\n";
die("foo: $!");
