Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^3: use sysread to read non-blocking filehandle

by x12345 (Novice)
on Nov 05, 2014 at 13:04 UTC ( #1106196=note: print w/replies, xml ) Need Help??

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)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2020-12-04 15:04 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (60 votes). Check out past polls.