in reply to c-style for loop versus list for loop, and bigint
You can confirm that this issue is isolated to the range operator by first taking it out of the for loop and then throwing in a translation with map.
Problem still exists below, so it's not some optimization of the for loop:
my @a = (1..999); for my $i (@a) {
Problem goes away due to using integers not created by the range operator:
my $j = 0; my @a = map {++$j} (1..999); for my $i (@a) {
|
|---|