Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It'd seem to be.
I still favour a blocking read over blocking using select, though - you're using two system calls (which are relatively expensive) to do the job of one (unless there's something I'm missing). Paraphrasing the Cookbook a little, replacing your loop with would seem to work as expected. Just as a final point, I'm not 100% sure what you're trying to achieve with your calls to index and substr - all you seem to be doing there is stripping the newline, which you can achieve using chomp. Hope that helps. -- Foxcub
In reply to Re^3: select($rin,undef,undef,undef) only blocking once
by Tanalis
|
|