Brandon's Notepad

August 23, 2011

Slurping Files In Perl

Filed under: Perl — Brandon @ 10:57 am
Tags: , ,

“Slurping” is a technical term that means to import an entire file into memory at one time. This is typically done when the data imported will not be changed, because it is static lookup data for example, or because you want to protect the contents of the file from accidental corruption. I use this technique often and was going to write a how-to post, but it seems that Uri Guttman has already posted an excellent treatment of this topic on the Perl.com blog titled Perl Slurp-Eaze.


Advertisements

Blog at WordPress.com.

%d bloggers like this: