The 0 in can_read(0) means wait 0 seconds. That's a very short time, which is why can_read always returns instantly. Use can_read().
Update: Nevermind. Contrary to the documentation, a timeout of 0 is the same as no argument.
In reply to Re: Problem with IO::Select
by ikegami
in thread Problem with IO::Select
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |