in reply to Re: Re: File to @array then parse like a file
in thread File to @array then parse like a file
I'm not aware of any operating system that deals with "lines" on a file level. Unix-wise, it's all just a stream of characters. Perl-wise, unless you use sysread, you'll get buffered reads, so you'll only hit the disk when you've exhausted the buffer, not every time you want a new line.
There may be a filesystem out there that does work with lines, not characters. To my knowledge, Perl doesn't do anything different there.
Update: I forgot to mention block device buffering, or buffering in the disk controller.
|
|---|