From: ricky quirch Date: 2012-06-29T23:55:17+09:00 Subject: Newb on String to Hex for UDP packet Guys im a total newb to ruby and i have been battling with something that should be very simple, help! the situation is this: i need to feed a program via user input an int or worst case a hex string... eg: Please enter last octect of IP address: user enters:123 or 7B i then want to include that as a hex byte in a UDP packet and send it. Eg: UDP = "/x00/x12/x23/(insert value in hex here)/x00/x00" I managed to include the value in there but the resulting UDP packet is sending the value in asccii, the packet looks like: 00:12:23:31:32:33:00:00 i have tried a bunch of variations and nothing.. any help is appreciated. -- Posted via http://www.ruby-forum.com/.