in reply to Increasing Buffer size of STDIN on PERL Program
Thanks for all the quick responses.
Unfortunately slurping the data won't work in my application since the data is a neverending stream -- I'm getting data straight from syslog.
I followed the initial suggestions of using setvbuf and found that on my Solaris 8 machine with Perl 5.6 my maximum usable buffer size is 10,240 characters.
Though this isn't as large as I'd have liked (something bordering 500K would be nice), I found that the average length of my incoming syslog messages is 136 characters, thus a buffer of this size allows me to capture 75 lines in the buffer.
|
|---|