use Number::Format; my $fmt = Number::Format->new( THOUSANDS_SEP => q{.}, DECIMAL_POINT => q{,}, ); print $fmt->format_number(1234.12, 2, 1), "\n";