Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@a = (3,1,2,5,6); print join(",",sort { $a <=> $b} @a); print join(",",sort { $a <= $b} @a);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple typo in numerical sort, major error
by ikegami (Patriarch) on Dec 30, 2009 at 23:12 UTC | |
by AnomalousMonk (Archbishop) on Dec 31, 2009 at 21:25 UTC | |
|
Re: Simple typo in numerical sort, major error
by desemondo (Hermit) on Dec 30, 2009 at 23:20 UTC | |
by JavaFan (Canon) on Dec 30, 2009 at 23:44 UTC | |
|
Re: Simple typo in numerical sort, major error
by apl (Monsignor) on Dec 31, 2009 at 13:03 UTC | |
|
Re: Simple typo in numerical sort, major error
by Anonymous Monk on Dec 30, 2009 at 23:16 UTC |