in reply to BIN to HEX

You might also like to look at the ord function, perldoc -f ord.