On 12/6/06, Carl Drinkwater <carl / carldr.com> wrote: > > Or, based on Carlos' optimisation (and I use the term very loosely in > > the context of golfing): > > > > hex_ip.scan(/../).map{$&.hex}*"." > > > > Saves another two characters... and looks horribly perlish. > > You've broken it :) > So I have. I guess I need to start writing unit tests for my golfing efforts. What a sad state of affairs... Anyway, here's another one (with a little help): require 'scanf' hex_ip.scanf('%2x'*4)*"." => "192.168.1.103" max