use Math::Currency; my $num = 12.3456789; $num = Math::Currency->new($num);