in reply to timeout for ?

You could try Term::ReadKey it seems to do exactly what you want - ie non-blocking IO with a timeout.

Looks like it works on Win/Unix also.

Actually reading the man page a bit more carefully I see that the method you really want to use doesn't work under windows :-(