Nope, Sir. I do run it on a 64bit server (linux), and the Perl I use on it shows the following first line when using '-v':

This is perl 5, version 16, subversion 0 (v5.16.0) built for x86_64-linux-thread-multi

Also, I think that my "-" implementation should have been within the limits of the "sort" specifications (by the way, I don't know who I should contact about it, but it is somewhat sketchy. I mean, telling us we should provide a negative, null, or positive integer is all well and good, but telling us WHAT IT MEANS (like "a null value means that both elements have the same rank", and so on) would have been a huge improvement.

Anyway, yes, it now works correctly when using <=>, so I'm guessing that, despite the version being a 64b Perl, there is indeed a problem with the huge negative numbers I got (possibly some kind of negative overflow, or merely a bug where the function doesn't expect as much data, and "loses" important parts, like the first characters (including the sign). I really don't know.


In reply to Re^2: Problem with a sort result by kzwix
in thread Problem with a sort result by kzwix

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.