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;?
In reply to Re^3: How to pack and unpack 16 bit decimal with leading zero
by BrowserUk
in thread [SOLVED] How to pack and unpack 16 bit decimal with leading zero
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |