\nmy $contents;\nsysopen(F, "somefile.dat");\nsysread(F, $contents, -s F);\nclose(F);\n
is about as fast as you can go in Perl. But that might not help if you need to slice the file into pieces for processing, since the pieces will need yet more memory.