Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-10-10 20:58 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (258 votes), past polls