Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Monks, I have a script that constantly monitors disk usage on a unix server, showing which ones are the busiest. I would like to put some sort of user exit facility within the loop, whereby the user can enter q to quit the script, but would timeout after n seconds if they did not enter anything and carry on checking the disks. If a q was entered at anytime, it would get picked up at the next input check. Do you think this is possible. TIA. Sean.

Replies are listed 'Best First'.
Re: User input timeout
by Abigail-II (Bishop) on Jul 16, 2002 at 13:38 UTC