From: Sebastian Hungerecker Date: 2008-10-13T08:54:17+09:00 Subject: Re: Sorting help Ron Askew wrote: > I the values are actually numeric, they should be stored as numerics, > manipulated as numerics, and sorted as numerics. > > So... the question is: WHY ARE THEY STRINGS? PROBABLY BECAUSE THE OP REALIZED THAT 10.1.25 ISN'T REALLY A LEGAL NUMBER. And he either did not think of storing it as [10,1,25] or maybe he reads it from user input or from a file. Though of course the solution (to get numerical sorting) still is to get it into that form (split(".").map(&:to_i)) and then sort. HTH, Sebastian -- Jabber: sepp2k@jabber.org ICQ: 205544826