📅  最后修改于: 2022-03-11 14:48:11.048000             🧑  作者: Mango
# Format number with up to 8 leading zeroes
my $result = sprintf("%08d", $number);
# Round number to 3 digits after decimal point
my $rounded = sprintf("%.3f", $number);