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 |
how to find a substring in a string without using substr built in functions, and print the substring found
what is the procedure to define a user define module in your perl application?
Can inheritance be used in perl?
Which functions in perl allows you to include a module file. State their differences.
Write a simple regular expression to match an IP address, e-mail address, city-state-zipcode combination.
What are the various perl data types based on the context?
What syntax is used for grep() function?
You want to add two arrays together. How would you do that?
Comment on data types and variables in perl.
what is Chop & Chomp function does?
write a script to check whether user enter a value is a leap year or not?
3 Answers Oracle, Persistent, ViPrak,
What is Perl?