in reply to Keyboard timeout in perl
This is a FAQ. Searching for "perl timeout" or typing perldoc -q timeout points out perlfaq8, "How do I timeout a slow event?".