From: Robert Klemme Date: 2007-10-01T22:24:48+09:00 Subject: Re: got a range from an array, but looking for other ways of doing it 2007/9/30, Simon Schuster : > a is an array. I'm trying to chop the first and last third off. or, > choose only the middle third. can be a rough third. > > a.length # 4808 > range = a.length * 0.3 # 1442.4 > range = range.to_i # 1442 > rangetop = a.length / 2 + range # 3846 > rangebottom = a.length / 2 - range # 962 > > a[rangebottom..rangetop].length # 2885 What exactly do you want to do with the slice? Kind regards robert