Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: IO::Handle read error description?

by vsespb (Hermit)
on Apr 28, 2010 at 18:56 UTC ( #837371=note: print w/ replies, xml ) Need Help??


in reply to Re^3: IO::Handle read error description?
in thread IO::Handle read error description?

I was thinking sysread(... 4096 ... will block until read all 4096 bytes...


Comment on Re^4: IO::Handle read error description?
Re^5: IO::Handle read error description?
by ikegami (Pope) on Apr 28, 2010 at 19:44 UTC
    It will return whatever bytes are available.
    $ perl -e'$|=1; print "a"; print "b"; sleep 1; print "c"' | \ perl -le'print "[$buf]" while sysread(STDIN, $buf="", 4096);' [ab] [c]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2015-07-06 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls