1. it's not Perl issue with float number
all program language(ex: Java, php, Python, shell, C, awk ....) have the same issue when it use IEEE 754 http://zh.wikipedia.org/zh-tw/IEEE_754
IEEE二進位浮點數算術標準(IEEE 754)是20世紀80年代以來最廣泛使用的浮點數運算標準,為許多CPU與浮點運算器所採用。這個標準定義了表示浮點數的格式(包括負零-0)與反常值(denormal number)),一些特殊數值(無窮(Inf)與非數值(NaN)),以及這些數值的「浮點數運算子」;它也指明了四種數值修約規則和五種例外狀況(包括例外發生的時機與處理方式)。
2. use below solution if you want to get result
2a: Math::BigFloat
2b: printf, sprintf
2c: use integer to do that
---------------------
use strict;
use warnings;
use Math::BigFloat;