pelagic has asked for the wisdom of the Perl Monks concerning the following question:
producesprint join (', ' , sort {$a <=> $b || $a cmp $b} (2, 0, 1, 99, 'aaa', 'AAA', undef, 'ZZZ', 'zzz')) , "\n";
Why is undef the first item?__OUTPUT__ , 0, AAA, ZZZ, aaa, zzz, 1, 2, 99
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Puzzeled about Sorting
by Zaxo (Archbishop) on Jun 10, 2004 at 11:23 UTC | |
|
Re: Puzzeled about Sorting
by dave_the_m (Monsignor) on Jun 10, 2004 at 11:31 UTC | |
|
Re: Puzzeled about Sorting ('natural')
by tye (Sage) on Jun 10, 2004 at 16:48 UTC | |
|
Re: Puzzeled about Sorting
by pelagic (Priest) on Jun 10, 2004 at 11:59 UTC | |
|
Re: Puzzeled about Sorting
by Anonymous Monk on Jun 12, 2004 at 04:55 UTC |