Very strange and dangerous... Some workarounds:
use strict; use warnings; use bigint; print "\nWith two foreach loops:\n\n"; for my $j (20 .. 22) { for my $i (12 .. 14) { print $i ** ($j+0), "\n"; } } print "\nWith two foreach loops:\n\n"; for my $j (20 .. 22) { for my $i (12 .. 14) { print (((0+$i) ** $j), "\n"); } } print "\nWith two foreach loops:\n\n"; for my $j (20 .. 22) { for my $i (12 .. 14) { print ((0+$i) ** ($j+0), "\n"); } }
In reply to Re^2: Strange interaction of bigint and foreach
by hdb
in thread Strange interaction of bigint and foreach
by Athanasius
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |