Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
use Term::ReadKey;
ReadMode 4; # Turn off controls keys
my $TimeOut = 5;
my ($Key, $i);
print "Waiting $TimeOut seconds for input: ";
for ($i=0; $i<$TimeOut; $i++) {
last if (defined($Key = ReadKey(-1)));
sleep(1);
}
if (defined($Key)) {
print "Got key $Key \n";
} else {
print "\nTimed out on STDIN \n";
}
ReadMode 0; # Reset tty mode before exiting