Those hex constants represent 64-bit integers. You are using a version of Perl that can only handle 32-bit integers.
Several possibilities exist.
$var1 = 0x0000805063008357 ;; Hexadecimal number > 0xffffffff non-portable at ( $var2 = 0x042426FFFFFFFFFF;; Hexadecimal number > 0xffffffff non-portable at ( printf "0x%0x\n", $var1 ^ $var2;; 0x424a6af9cff7ca8
The non-portable warnings are just a stupid annoyance that can be suppressed.
$str2 = '042426FFFFFFFFFF';; $str1 = '0000805063008357';; print unpack 'H*', pack( 'H*', $str1 ) ^ pack('H*', $str2 );; 0424a6af9cff7ca8
Whether that is useful will depend on how you are going to utilise the result?
That allows a 32-bit perl to manipulate 64-bit numbers, though you'd probably get those annoying 'non-portable' warnings.
As always, the right solution for your purpose will depend heavily upon that purpose?
In reply to Re^3: Hexadecimal Exclusive OR
by BrowserUk
in thread Hexadecimal Exclusive OR
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |