Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Packing and Unpacking. Hi, I want to get output as 0x23400000345.... in the below example How t..

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

Post New Answer

More CGI Perl Interview Questions

What are the various perl data types based on the context?

0 Answers  


For a situation in programming, how can you determine that Perl is a suitable?

0 Answers  


How can you replace the characters from a string and save the number of replacements?

0 Answers  


What value is returned by a lone `return;’ statement?

0 Answers  


What is the difference between perl list and perl array?

0 Answers  


Write a program that explains the symbolic table clearly.

0 Answers  


What is the difference between module and package?

4 Answers   EDS, IBM, Symantec,


“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?

0 Answers  


What is q (single q) operator in perl?

0 Answers  


What is posix in perl?

0 Answers  


What is the tk module?

0 Answers  


what is the difference b/w coldfusion MX 6 and Coldfusion MX 7?

1 Answers  


Categories