in reply to Re: Stumped with select->can_read (buffered)
in thread Stumped with select->can_read
That makes sense. Would I have to use read() in this case?
I tried doing:
while(@ready = $sel->can_read) { foreach my $fh(@ready) { my $line = ""; my $buf = ""; while(read($fh, $buf, 1024)) { $line .= $buf; } } }
Didn't work for me, maybe because LENGTH (=1024) is too big? Sorry, I'm not familiar with read(), as you can see :/
EDIT: nvm. I'm reading the link you posted now. Will report back if I still can't figure it out. Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Stumped with select->can_read (buffered)
by zentara (Archbishop) on Aug 03, 2012 at 20:43 UTC | |
by w1r3d (Initiate) on Aug 03, 2012 at 21:07 UTC | |
by tye (Sage) on Aug 03, 2012 at 21:24 UTC | |
by zentara (Archbishop) on Aug 04, 2012 at 08:00 UTC | |
by tye (Sage) on Aug 04, 2012 at 16:48 UTC |
In Section
Seekers of Perl Wisdom