From: "Kontra, Gergely" Date: 2002-05-17T22:44:36+09:00 Subject: Re: Shifting array element & regex on array element Azt irtad, hogy >Holden Glova writes: > >> On Fri, 17 May 2002 22:45, Yohanes Santoso wrote: >> > The way I am implementing right now is: >> > 80000.downto(2) {|i| array[i+1]=array[i]} >> irb(main):023:0> array[0..0] + [2] + array[1..-1] >> [1, 2, 3, 4, 5] What about a[1...1]=2 Seems to work for me... Gergo +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ | Email: kgergely@mcl.hu, kgergely@turul.eet.bme.hu | | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ . Magyar php mirror es magyar php dokumentacio: http://hu.php.net