From: Ryan Leavengood Date: 2006-05-22T00:30:34+09:00 Subject: Re: How to reverse String.unpack('H*') On 5/21/06, Han Holl wrote: > > The following works, but seems awfully complex: > fl = "17000000" > fl.unpack('a2a2a2a2').collect {|x| "0x#{x}".hex}.pack('I').unpack('I')[0] > > Any suggestions ? irb(main):001:0> ["17000000"].pack('H*').unpack('I*')[0] => 23 Ryan