in reply to nonblocking io

Just a thought: try giving &IO::Select::can_read a timeout value. This should keep it from blocking. I'm not sure what the consequences would be if timeout occurs (I'm working my way slowly through NPwP myself), but it would be fun testing it.