in reply to Re^3: Complex conditional sort
in thread Complex conditional sort
but that's one of the most important things to be familiar with when dealing with sorting in my opinion. Especially the <=> and cmp operators.
Only those. Again, Perl makes no guarantee as to what the others return. It's definitely not important to be familiar with what they return as they can return anything true and anything false. In fact, they don't always return the values you think they return.
I'd probably choose using the >0 test.
Same exact problem as negation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Complex conditional sort
by wind (Priest) on Mar 09, 2011 at 19:27 UTC | |
by ikegami (Patriarch) on Mar 09, 2011 at 20:42 UTC | |
by wind (Priest) on Mar 09, 2011 at 21:00 UTC |