in reply to Reading partial lines/strings from a pipe
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).# from Programming Perl my $buffer; while ( read $your_handle, $buffer, 1024 ) { # process buffer here }
The Perl Cookbook is an excellent reference for doing this sort of work.
Phil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading partial lines/strings from a pipe
by slightly72 (Initiate) on Oct 10, 2007 at 18:24 UTC |