in reply to Re: Increasing Buffer size of STDIN on PERL Program
in thread Increasing Buffer size of STDIN on PERL Program
This is only advisable if the input data will fit into the available memory without compromising other processes at the same time.
You don't want the system to start paging heavily or exhaust memory just for the sake of having all data in memory at once.
Slurping files can sometimes be advantageous.
Other times using read() or sysread() to read large blocks of data might do the trick.
Personally I still find myself using a simple while (<FH>){...} for most jobs, from logfiles to multi-gigabyte datasets.
Cheers,
BazB
If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.
|
|---|