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 |
what are steps to do to lock the sony ericsson mobile with password?
What is -> symbol in perl?
Explain perl one-liner?
You want to concatenate strings with perl. How would you do that?
Explain split function in perl?
When do you use perl programming?
What is the difference between exec and system?
Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?
What is a chomp() function in perl?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
What are the logical operators used for small scale operations? Explain them briefly.
What is subroutine in perl?