in reply to Re: List::Utils can't find max in array of BigInts (XS--)
in thread List::Utils can't find max in array of BigInts
Dang, even a simple foreach produces the same unblessed reference error:
-------my $max_bigint = $result[1]; foreach (@result) { if ($_ > $max_bigint) { $max_bigint = $_; } } say $max_bigint;
Can't call method "can" on unblessed reference at C:/Languages/Perl/perl/lib/Math/BigInt.pm line 2693. at trial_division.pl line 12. main::__ANON__('Can\'t call method "can" on unblessed reference at C:/Languag...') called at C:/Languages /Perl/perl/lib/Math/BigInt.pm line 2693 Math::BigInt::objectify(2, 'Math::BigInt', 'ARRAY(0x3faefc)', 'Math::BigInt=HASH(0x3fb1bc)') called at C:/Languages/Perl/perl/lib/Math/BigInt.pm line 1050 Math::BigInt::bcmp('Math::BigInt', 'ARRAY(0x3faefc)', 'Math::BigInt=HASH(0x3fb1bc)') called at C:/Languages /Perl/perl/lib/Math/BigInt.pm line 65 Math::BigInt::__ANON__('Math::BigInt=HASH(0x3fb1bc)', 'ARRAY(0x3faefc)', 1) called at trial_division.pl line 55
It the exact same stack trace as when I tried to use List::Util::max().
|
|---|