From: Alex Young Date: 2007-04-30T16:02:36+09:00 Subject: Re: sorting by rand? Peter Seebach wrote: > In message <46358854.30705@cesmail.net>, "M. Edward (Ed) Borasky" writes: >> Welll ... I do this in Excel all the time -- add a column of random >> numbers to the right of the (CSV) file I want to shuffle, sort it about >> five times, hitting F9 before each sort to change the random numbers, >> and then deleting the random column and saving the file. Translate that >> to Ruby and I think you've got it. > > It seems expensive. That's almost exactly what sort_by{rand} does... -- Alex