Hi, "Eric Crampton" <EricCrampton / worldnet.att.net> wrote in message news:ilelr2dnfb.fsf / elmo.atdesk.com... > Is there any equivalent of the htons() and htonl() functions? Couldn't > find anything in the pick axe book. You can define functions like following def htonl(h) [h].pack("L").unpack("N")[0] end def htons(h) [h].pack("S").unpack("n")[0] end Park Hee-Sob.