We don't bite newbies here... much | |
PerlMonks |
Re: Strange interaction of bigint and foreachby moritz (Cardinal) |
on Apr 11, 2013 at 12:58 UTC ( [id://1028142]=note: print w/replies, xml ) | Need Help?? |
What happens is that the range operator .. is not overloadable. bigint works by overloading operators and literals, and since .. is not overloadable, it can't make bigint ranges work. And, more to the point here, the variables coming out of iterating a range are normal ints, and not bigints. This is a known limitation, over which I've also stumbled in the past. I don't know if it's documented somewhere; if not, it really should be. Update: I've submitted a doc patch which mentions this problem in bigint.pm and overload.pm. Second Update: patch accepted, so perl 5.18 will contain the updated documentation.
In Section
Seekers of Perl Wisdom
|
|