in reply to Re^4: Hex String XOR
in thread Hex String XOR
Yes, ^ does work on strings, but as the OP mentioned, it works on the string's bytes, not the hexadecimal numbers encoded in the string.
$ perl -E"say '112233'^'aabbcc'" PPPPPP $ perl -E"say sprintf '%x', 0x112233 ^ 0xaabbcc" bb99ff
My code gives the latter behaviour (which the OP wants) on hexadecimal strings of arbitrary length.
|
|---|