Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by tye (Cardinal)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2015-07-28 21:09 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 (259 votes), past polls