in reply to Re^3: How to use the int-function?
in thread How to use the int-function?
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to use the int-function?
by kennethk (Abbot) on Jan 03, 2011 at 16:07 UTC | |
by Anonymous Monk on Jan 03, 2011 at 16:25 UTC | |
|
Re^5: How to use the int-function?
by ruzam (Curate) on Jan 03, 2011 at 19:30 UTC |