in reply to Select not recognizing input from STDIN
There are some useful tips and links under the textarea into which you typed your question:
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
You've posted the code snippet that works for you:
But you want to get help for code that doesn't work, and you haven't posted that code. Can you show us how you're using the select?while(1) { my $input=<STDIN>}
Update: Oh! In general it is not a good idea to mix select with buffered operations like <STDIN>. See the warning in the end of select function documentation. The problem is that the last line has been read already and placed into the buffer when you're calling select, and select doesn't know about buffer, it checks only file descriptor.
|
|---|