use Number::Format; my $f = Number::Format->new(DECIMAL_POINT => ","); say $f->format_number($num, 2, 2);