HI, Still it is printing in the same order it doesn't provide the result in right order. RAJ -- Posted via http://www.ruby-forum.com/.