|Pathologically Eclectic Rubbish Lister|
Strange interaction of bigint and foreachby Athanasius (Canon)
|on Apr 11, 2013 at 12:54 UTC||Need Help??|
Athanasius has asked for the
wisdom of the Perl Monks concerning the following question:
I’ve been using the exponentiation operator ** in conjunction with the bigint pragma to generate large integral powers, which I need to be exact. After some debugging, I found the following:
As you can see, the inner foreach loop is somehow cancelling the effect of the use bigint pragma; but converting that loop into a C-style for loop fixes the problem and gives me the output I need.
So, what’s going on? Is this behaviour documented anywhere? Is it a bug?