http://www.perlmonks.org?node_id=927951


in reply to Ask for STDIN but don't pause for it

You need to do what's called a non-blocking read. You will likely need to deal with some buffering issues on input/output, but Google can give you plenty now that you have a search term. In particular, see Non-blocking reading on STDIN?.
  • Comment on Re: Ask for STDIN but don't pause for it