From: "ara.t.howard" Date: 2008-05-18T04:27:21+09:00 Subject: Re: Hex to decimal? On May 17, 2008, at 1:15 PM, Tim Hunter wrote: > "f0 d7e2 28" => \240\215\226\040 cfp:~ > cat a.rb def hex2decimal string string.to_s.split(%r/\s+/).map{|h| "#{ 92.chr }%03d" % eval("0x#{h}")}.join end puts hex2decimal("f0 d7 e2 28") cfp:~ > ruby a.rb \240\215\226\040 a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama