in reply to Re^2: Emulating 'sort' command through a Perl
in thread Emulating 'sort' command through a Perl
I think I have found 1 bug in the code.
Suppose I am sorting a text file containing following rows by column 3 i.e numeric 2:
FT9mWp<SPACE>d4fgMB<SPACE>gvZRJU<SPACE>XRRu0N
4ewejk<SPACE>pFnjd4<SPACE>ie0hZF<SPACE>pPipQJ
4ewejk<SPACE>4sqprx<SPACE>ie0hZF<SPACE>cqtexi
Fo1OKn<SPACE>qhZPvb<SPACE>qWZPrt<SPACE>ruBObs
The code should give the output:
FT9mWp<SPACE>d4fgMB<SPACE>gvZRJU<SPACE>XRRu0N
4ewejk<SPACE>4sqprx<SPACE>ie0hZF<SPACE>cqtexi
4ewejk<SPACE>pFnjd4<SPACE>ie0hZF<SPACE>pPipQJ
Fo1OKn<SPACE>qhZPvb<SPACE>qWZPrt<SPACE>ruBObs
But it is giving:
FT9mWp<SPACE>d4fgMB<SPACE>gvZRJU<SPACE>XRRu0N
4ewejk<SPACE>pFnjd4<SPACE>ie0hZF<SPACE>pPipQJ
4ewejk<SPACE>4sqprx<SPACE>ie0hZF<SPACE>cqtexi
Fo1OKn<SPACE>qhZPvb<SPACE>qWZPrt<SPACE>ruBObs
Difference can be found out through 2nd & 3rd cell values of 2nd column i.e numeric 1 of both the outputs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Emulating 'sort' command through a Perl
by Marshall (Canon) on Oct 30, 2009 at 18:08 UTC | |
by Anonymous Monk on Oct 30, 2009 at 18:44 UTC | |
by Marshall (Canon) on Oct 30, 2009 at 20:11 UTC |