Packing and Unpacking.
Hi, I want to get output as 0x23400000345....
in the below example
How to get?
i tried out, but unable to get the answer
$r=0x234;
$t=0x345;
$y=pack('L L',$t,$r);
$x1=unpack('L!',pack('P',$y));
printf("\nThe value is $x1");
I didn't get constant output
Answer / kiruthikau
use the following code.
<code>
use bigint;
my $r = 0x234;
my $t = 0x345;
my $x1 = $r << 32 | $t;
print $x1->as_hex;
</code>
| Is This Answer Correct ? | 2 Yes | 0 No |
Which web site will help the student to download the Java mini Project ?
What is posix in perl?
How can arrays be tied?
Explain perl one-liner?
Enlist the advantages of using c over perl?
What is perl pop array function?
What is an interpolation in perl?
what is perl language?
How to code in perl to implement the tail function in unix?
What are the various advantages and disadvantages of perl?
How many ways can we express string in Perl?
You want to open and read data files with perl. How would you do that?