in reply to Re: decimal point
in thread decimal point
Close. %0.2f.
perl -e '$x=80.03723;printf "%0.2f", $x'
Cheers,
Ovid
Update: For those who may be confused, ehdonhon originally had "%0.2d", instead of "%0.2f". My reply looks a bit odd without that context.
Update 2: It seems I made my original post before ehdonhon fixed /h(is|er)/ node. Then, I made made my update before seeing ehdonhon's update, thus, my update looks confusing in light of the other update. Sigh. I guess we'll play ping-pong with the updates :)
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|