in reply to STDIN and timeout or auto answer

One way would be to use native system calls.
  1. Win32API::File's GetOsFHandle to get the underlying OS handle.
  2. ReOpenFile the handle with FILE_FLAG_OVERLAPPED.
  3. CreateEvent to create the event on which to wait.
  4. ReadFile to start waiting for data.
  5. WaitForSingleObject with a timeout to wait for input.
  6. CloseHandle to release the event and the file handle.

The system calls can be accessed via Win32::API and via other modules (such as Win32API::File and Win32::Event).

Update: Oh oops, I had suggested CreateFile, but that isn't applicable. Replaced with ReOpenFile.