Rob's message contains the exact code you need.

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