Yes I know the column here is 3rd. Let me explain the bug taking an example.

Suppose if any 2 row values of 3rd column are same (like in this case ie0hZF)

In that case it should sort by first column values of those 2 rows.

Now what if those 2 values are also same as. (like in this case - 4ewejk)

Then it will try to compare by respective 2nd column values and what if one of the value start with a digit (like in this case 4sqprx) and other with alphabet (like in this case pFnjd4) then number should come first bcoz its ascii value is less.

Which is not happening here...


In reply to Re^5: Emulating 'sort' command through a Perl by Anonymous Monk
in thread Emulating 'sort' command through a Perl by paragkalra

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.