http://qs321.pair.com?node_id=1106196


in reply to Re^2: use sysread to read non-blocking filehandle
in thread use sysread to read non-blocking filehandle

I found the problem in my loop, after use perl -d debugger, it is the $bytes_read should be "my $bytes_read", in the code, it is defined twice, it is a little bit confused, should have better clear way to do that, but in the code I have, it is like that, and when I rewrite the code, I remove my in frond $bytes_code in the while loop, which was wrong. So it should be
my $bytes_read = sysread($fh,$bug,$blocksize)