I\'m maintaining some code that reads values over a serial radio and unpacks them into Perl data structures:
# Don\'t yell at me, I didn\'t write this if (
This script works up to at least $N=5000000. After that, it runs out of memory.
$N=5000000
$N = $ARGV[0] || 5000; $q = '(.)' x $N; $regex = qr/$q/; ("x" x $N) =~ $regex; print eval "\$$N";