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 file operations in perl. Explain with example.

0 Answers  


Define operators used in perl?

0 Answers  


I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur

0 Answers  


When does circular reference occur?

0 Answers  


what r the different type of function in perl ???

1 Answers   ABC, Symphony,


Can any1 tell me 2 write the script using perl script 2 looking at a log file 2 see wheather the test has passed or not.

3 Answers   TCS,


Explain different types of perl operators.

0 Answers  


How to read a single line from a file in perl?

0 Answers  


Differences between die and exit.

0 Answers  


Comment on array slicing and range operator

0 Answers  


Write a cgi program to show the header part?

0 Answers  


What does `$result = f() .. g()' really return?

0 Answers  


Categories