in reply to Re^2: packing and unpacking
in thread packing and unpacking
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: packing and unpacking
by ungalnanban (Pilgrim) on Mar 12, 2010 at 12:26 UTC | |
by almut (Canon) on Mar 12, 2010 at 13:00 UTC |