Use printf "%5.3f\n", $float;
In reply to Re: How to round and keep floating digits by BrowserUk in thread How to round and keep floating digits by juo