Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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

by vsespb (Chaplain)
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?

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://837371]
[shmem]: trying to build a RPM for some perl with a bunch of modules. Trying perlbrew, trying alien.
[stevieb]: finally got my 12v solar setup for my Pi/Arduino, with a 12v 7.2Ah battery. Testing how long the Pi will run on the fully charged battery before I hook it up to the solar regulator. I expect between 8 and 18 hours, depending on load.
[shmem]: ...writing a Makefile for that. Edit, test, lather, rinse, repeat.

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2017-03-25 22:21 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (313 votes). Check out past polls.