Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Problem with IO::Select

by merlyn (Sage)
on Mar 01, 2007 at 00:02 UTC ( #602624=note: print w/replies, xml ) Need Help??

in reply to Problem with IO::Select

my $rx_txt; while (length($rx_txt)) { $sock->recv($rx_txt, 1024); $buff.=$rx_txt; }
Last time I checked, the length of undef is 0 (while getting a warning), and that's false. Can't imagine the code inside that loop makes much difference then. :)

Replies are listed 'Best First'.
Re^2: Problem with IO::Select
by timos (Beadle) on Mar 01, 2007 at 00:11 UTC
    You are right of course. But this does not fix my problem. The results are the same with
    while (length($rx_txt) > 0) { $sock->recv($rx_txt, 1024); $buff.=$rx_txt; }
    But I have to admit I am a little bit ashamed of myself now. :-)
      You still aren't reading anything. length(undef) is certainly not greater than 0.

      Also, $sock is not the right socket to be reading from anyway.

        Ah, ok. So I changed it to
        my $rx_txt = "something"; while (length($rx_txt) > 0) { $conn->recv($rx_txt, 1024); $buff.=$rx_txt; }
        But the problem stays the same.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602624]
Tanktalus has to figure out why his cb talker isn't working :(
[choroba]: https?
[choroba]: That was at least why my cb talker wasn't working.
[Tanktalus]: curious, then, why the reader works :)
[Tanktalus]: or posting the last hour of cb... well, maybe I should double check that first :)
[Tanktalus]: yup, it's working. :)
[choroba]: https://github. com/choroba/pm-cb/ commit/7b57f513596 7bf8a29d74f1c307de 9a76894cdcf
[choroba]: Also, a thread here on PM mentioned that one of or should now work

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2018-07-15 21:28 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (326 votes). Check out past polls.