my $answer = 1; for my $j ( 1 .. 999 ) { print "$i: $answer\n"; $i=$j+0; # $i is now bigint $answer += $i ** $i; }