To elaborate on what was just said:
You are going to need to have one process/thread timing and the other waiting for user input.
One process/thread should sleep, then check if the user input has happened on the other thread/process. Sleep, then check. Sleep, then check. If input does not happen within a certain time, the timing process should kill the one waiting for user input (and then commit suicide)
"Never take yourself too seriously, because everyone knows that fat birds dont fly" -FLC
| [reply] |
Do you mean the user inputs the value, then the script exits after a time limit? Or the user has to enter input within a certain time limit, or the script ends?
If it's the first one, look into the sleep function. (sleep n - sleep for n seconds)
-Bryan
| [reply] |
Have a look at Term::ReadKey. The ReadKey function has a timeout option...
| [reply] |