Get a value from array

Hello.

I need to get a value from array.

For example:

h=[1234567,987654] # => 2 elements in array

I need to get a 3 to 6 digit from first element # => 3456
How i can do this?

···

--
Posted via http://www.ruby-forum.com/.

Hello.

I need to get a value from array.

For example:

h=[1234567,987654] # => 2 elements in array

I need to get a 3 to 6 digit from first element # => 3456

h[0].to_s[2,4]

···

On Nov 5, 2010, at 5:00 PM, Misha Ognev wrote:

How i can do this?

--
Posted via http://www.ruby-forum.com/\.