From: Jano Svitok Date: 2008-04-03T05:20:11+09:00 Subject: Re: Real Quick Question... On Wed, Apr 2, 2008 at 10:13 PM, Jeff Miller wrote: > Hello, > Let's say I have an array like this: > > @name_array = ["john", "t.", "smith"] > > how can I get the first and LAST entries? IE:, I don't want the middle > one or any in between. I know I can get the first entry by > @name_array[0], but this will be part of a function in which some arrays > will have 2 entries, others 3 or even more, and I just want the last > entry. How can I do this? quite surprisingly: @name_array.first and @name_array.last :)