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;?
|
|---|