Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^6: Stumped with select->can_read (concat)

by tye (Sage)
on Aug 04, 2012 at 16:48 UTC ( #985443=note: print w/ replies, xml ) Need Help??

in reply to Re^5: Stumped with select->can_read (buffered)
in thread Stumped with select->can_read

sysread as big of chunks as you can, then concat everything into a temp buffer

sysread can read onto the end of the buffer, avoiding the need to copy the data again:

sysread( $fh, $buf, 16*1024, length($buf) );

- tye        

Comment on Re^6: Stumped with select->can_read (concat)
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2016-02-08 19:45 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (283 votes), past polls