Traditionally, programs read information from a file by opening a file handle, reading data into memory, then closing the file handle. This module takes a different approach: it provides a scalar variable that magically corresponds to a file's content on disk without reading any new data into memory.
If you find yourself working with files of large or unknown size, this module saves you having to worry about the memory that perl might allocate.
Behind the scenes, the module uses mmap on Unix to do its magic. The module uses similar facilities on Windows and VMS, making it portable to most platforms that Perl developers often use.
I like this module because it combines the easiness of File::Slurp (or setting $/ to undef for those who like minimal dependencies) and the efficiency of other interfaces to mmap, such as Sys::Mmap, along with the benefit of better portability.
6 out of 6 found this review helpful. Was this review helpful to you? Yes No