Thank you very much this would help me,

and I have another question,

consider the below hash,

a={1=>2,3=>4,5=>6}

when I try to print the key values, it is not printing in the order

a.each do |key,value|
puts key
end

it's printing 5 3 1

Is there any way could I able to print in order.?

RAJ

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