You could also simply try
my $x1 = $r << 32 | $t; printf "\nThe value is 0x%x", $x1; # 0x23400000345
(though whether this works similarly depends of the build options of your perl)
P.S.: What exactly do you need this for? Maybe bigint or Math::BigInt would help.
Update:
use bigint; my $r = 0x234; my $t = 0x345; my $x1 = $r << 32 | $t; print $x1->as_hex;
In reply to Re^3: packing and unpacking
by almut
in thread packing and unpacking
by ungalnanban
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |