Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by tye (Sage)
on Aug 04, 2012 at 16:48 UTC ( [id://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        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-18 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found