Perl-Sensitive Sunglasses | |
PerlMonks |
Re^8: How does Math::GMP overload the assignment operator ? (more guessing)by syphilis (Archbishop) |
on Nov 11, 2020 at 01:30 UTC ( [id://11123565]=note: print w/replies, xml ) | Need Help?? |
one possibility is to first convert the object to a string and then use the builtin string->number conversion Yes, that seems consistent with the behaviour I've noticed. In the absence of a specified '0+' overload subroutine, $array[Math::GMPz->new(-2)] would be stringified to $array["-2"] and then numified to $array[-2] Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|