The Mmap module lets you use mmap to map in a file as a perl variable rather than reading the file into dynamically allocated memory. It depends on your operating system supporting UNIX or POSIX.1b mmap, of course.