in reply to Re^2: How to pack and unpack 16 bit decimal with leading zero
in thread [SOLVED] How to pack and unpack 16 bit decimal with leading zero

the reason that I need to have a leading zero, is that the number is a decimal. I am getting this value and then I split the decimal to the main and the remaining part

Then why are you splitting it into two parts?

Why not pack it as a floating point value: my $packed = pack 'f', 1.0124;?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!