my $pct = 10.300; $pct = sprintf "%.3g", $pct; print "$pct\n"; __OUTPUT__ 10.3
-Mark
In reply to Re: Deleting trailing 0's after using sprintf
by kvale
in thread Deleting trailing 0's after using sprintf
by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |