Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
When working with raw bytes, it pays to use the read method. It will block until something is available, then read up to a specified number of bytes:
That will read up to 1K from the handle, blocking if nothing is there, but returning whatever is there (the first 1K of it anyway). The Perl Cookbook is an excellent reference for doing this sort of work. Phil
The Gantry Web Framework Book is now available.
In reply to Re: Reading partial lines/strings from a pipe
by philcrow
|
|