Thank you. Both the answers worked. I have chosen Jesu's answer though.

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