< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous (in thread)
N :the next (in thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
On 10 Oct 2005, at 22:53, James Edward Gray II wrote:
> arr = eval "{{3.1, 1.3, 2.5, 2.1}, {2.1, 3.1, 2.4, 2.2}, {1.4, 2.2,
> 2.1, 4.2}}".tr("{}", "[]")
> arr.sort { |a, b| a.first <=> b.first }
Thanks, James - simple, elegant, and nearly perfect! Is it easy to
sort the array of arrays by their second, third, and fourth entries
as well:
ie such that
[[2.1, 2.2, 9.5, 2.1], [2.1, 2.2, 2.4, 2.2], [2.1, 2.2, 2.1, 4.2]]
sorts to
[[2.1, 2.2, 2.1, 4.2],[2.1, 2.2, 2.4, 2.2],[2.1, 2.2, 9.5, 2.1]]
rather than
[[2.1, 2.2, 9.5, 2.1], [2.1, 2.2, 2.4, 2.2], [2.1, 2.2, 2.1, 4.2]]
thanks
Pete