Comments and reviews are more than welcome.use warnings; use strict; use Number::FormatEng qw(format_eng); for my $num qw(1.23e2 1.234 1234.56 1234567 6.66e+29) { printf "%-10s -> %-10s\n", $num, format_eng($num); } __END__ 1.23e2 -> 123 1.234 -> 1.234 1234.56 -> 1.23456e3 1234567 -> 1.234567e6 6.66e+29 -> 666e27
In reply to Re^3: Engineering FP notation & sprintf
by toolic
in thread Engineering FP notation & sprintf
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |