in reply to Rounding numbers output
You appear to be dealing with sizes of files. In that regard, you should really be dividing by 1024 to get sensible values.
my $size = sprintf '%d', ((stat($file))[7]) / 1024;That will give you what you want. Oh, I nearly forgot, if you are looking for human-readable sizes, this has been covered in pretty print bytes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Rounding numbers output
by Anonymous Monk on Jan 22, 2003 at 15:39 UTC |