Maybe you could use an iterator instead of such a big list of integers.
The iterator pays an overhead of a function call for each new value, but saves memory. Check MJD Higher Order Perl Chapter 4 ( 4.2.1 ).
If I remember it right, range operator dont' build such a huge list in latest perls.