No such thing as a small change | |
PerlMonks |
Re^4: How to use the int-function?by Anonymous Monk |
on Jan 03, 2011 at 15:53 UTC ( [id://880213]=note: print w/replies, xml ) | Need Help?? |
kennethk, I've not yet found that printf would help me with formatting the output:
perl -e 'printf("%.2f\n", 1.255)' -> 1.25 perl -e 'printf("%.2f\n", 1.455)' -> 1.46 Although, there might be some option which jumps into the gap and helps to round the number?
In Section
Seekers of Perl Wisdom
|
|