Note that though this (probably) is a bug in perl, unless you've got a 64 bit OS, you can't address more than 4GB anyway, so your approach is limited. Also, if the bug was fixed and you have 4GB of memory, you'll push everything else into swap space, slowing your machine down a lot for no reason at all. You really should read()