good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
IO::Select: select vs. can_readby Coruscate (Sexton) |
on May 05, 2003 at 08:09 UTC ( [id://255590]=perlquestion: print w/replies, xml ) | Need Help?? |
Coruscate has asked for the wisdom of the Perl Monks concerning the following question: I came across an old(er) snippet of code I used a while back for a tcp server with IO::Socket and IO::Select. It used the IO::Select::select() method to get a list of clients that could be read from. I swear I've always used can_read() instead, but apparently not! So my question is quite very simple: do the two snippets below do the exact same thing? If so, great, I think I'll stick with can_read. If they differ in any manner, does anyhow have the knowledge to share with me the difference(s) between the two methods? I did a quick perldoc -m IO::Select and found the can_read() sub. It looks quite the same (ie: it utilizes select() in the same way), but with all the vector bits tech stuff thrown in, I can't tell exactly what's going on.
If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.
Back to
Seekers of Perl Wisdom
|
|