DavidSzczesniak
1/10/2018 - 3:46 PM

Buffering

This is a trick Perl uses for efficiency. It avoids making continous system calls for every little line you ask to read and instead imports a whole block of code into the 'buffer' to store temporarily.

=pod
This allows it to return the next bits of information you ask for much quicker, as it already has that data. 
The same thing is used for writing. When you write data into a file using print, that data doesn't go to the file right away, but into the buffer instead. 
When the buffer is full, Perl writes all the data from the buffer at once.
=cut