I have a string that looks like this "7a" and I want to convert it to the hex number 7A. I have tried using pack and unpack but that is giving me the hex representation for each individual character.
I have a string that looks like this 7a and I want to convert
Share
Probably the simplest way to store that as an integer is hexdec()