Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^5: Problem with IO::Select

by Thelonius (Priest)
on Mar 01, 2007 at 01:07 UTC ( #602631=note: print w/ replies, xml ) Need Help??

in reply to Re^4: Problem with IO::Select
in thread Problem with IO::Select

You probably meant to write:

while ($rh->recv($rx_txt, 1024) > 0) { $buff .= $rx_txt; }
But that's not good code when using 'select'. That's only okay if you're only handling one connection at a time. If you're only handling one connection at a time, don't use select.

Also, I hope you know that adding a file handle for "~/.somefile" only makes sense if it's a fifo (named pipe).

There are actually a lot of problems with your code. You should probably look at something somebody else has written. I recommend The Perl Cookbook, although there are a lot of free examples scattered about the internet.

Comment on Re^5: Problem with IO::Select
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602631]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-12-01 06:21 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (795 votes), past polls