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().


In reply to Re^2: List::Utils can't find max in array of BigInts (XS--) by mgatto
in thread List::Utils can't find max in array of BigInts by mgatto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.