in reply to Re^2: Stumped with select->can_read (buffered)
in thread Stumped with select->can_read
while(@ready = $sel->can_read) { foreach my $fh(@ready) { my $line = ""; my $buf = ""; # while(read($fh, $buf, 1024)) while( my $bytes_read = sysread( $fh, $buf, 1024 ) > 0 ) ) { print "$bytes_read\n"; { $line .= $buf; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Stumped with select->can_read (buffered)
by w1r3d (Initiate) on Aug 03, 2012 at 21:07 UTC | |
by tye (Sage) on Aug 03, 2012 at 21:24 UTC | |
by zentara (Cardinal) on Aug 04, 2012 at 08:00 UTC | |
by tye (Sage) on Aug 04, 2012 at 16:48 UTC |