http://www.perlmonks.org?node_id=799623


in reply to strings to number and XOR

Do you expect 0x3ba3 because 0x3ba3 == 0x7468 ^ 0x4fcb? However, unpack "H*", "th" equals 7468 == 0x1d2c.

And I don't understand the purpose of your split. Wouldn't @array = $msg =~ /(..)/g be much handier?