Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Using select() on only one socket

by ivanatora (Sexton)
on Sep 04, 2005 at 10:40 UTC ( [id://489040]=note: print w/replies, xml ) Need Help??


in reply to Re: Using select() on only one socket
in thread Using select() on only one socket

I tried that, and it prints the incoming line. Also the select loops starts. I've change the following:
print "bob\n"; my $sel = IO::Select->new(); $sel->add($sock); while (1){ print "!"; if ($b = $sel->can_read(0.5)){ $line = <$socket>; print $line; } else { print "."; } } #end of while 1
I see 'bob' printed, so the program is running there. After that I see infinite '!'s, so the loop starts. But nothing more. No dots, no lines.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-25 12:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found