
hem
User
Sep 8, 2012, 12:06 PM
Post #4 of 4
(1264 views)
|
|
Re: [BillKSmith] Get each bit from a number
[In reply to]
|
Can't Post
|
|
Hi Guys Thanks for your help. I used your advice and did the following. Appreciate your help and time . Thanks a ton
my $firstVar = 19; $firstVar = unpack("B32", pack("n", $firstVar)); my $First = substr($firstVar,-1,1); #to get the last bit
|