use Math::Decimal64; for ($x = Math::Decimal64->new('0.8'); $x > '0.1'; $x -= '0.01') { print "$x\n"; } # or if one is insistent upon receiving 0.xx formatting of the values (instead of "xxe-2") formatting: for ($x = Math::Decimal64->new('0.8'); $x > '0.1'; $x -= '0.01') { print "$x" + 0, "\n"; }