How To Format The Number Of Decimal Places In Perl

1 2 |
my $number = 123.45; printf("%.3f", $number); |
Outputs: 123.450
1 2 |
my $number = 123.45; printf("%.3f", $number); |
Outputs: 123.450
Categories: How-To's, Technology Tags: Decimal, Float, Floating, Floating Point, Format, howto, Number, perl, printf, Round, Rounding, sprintf, tips
|
No comments
Copyright © 2005-2025 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress