Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I would say first of all that your idea of 1 Gb is probably wrong? I presume that you meant 1 GB. The little b means bit, but capital B means byte.
Oooh, this is really complex when dealing with hard disk or memory sizes. One Kilo Byte to an engineer is 1024 bytes. To a marketing guy one KB is 1,000. They do this so that the numbers look bigger! In "C", I would just use 64 bit int's (or unsigned 64 bit ints) for the vars which use the actual number of bytes for math operations. So one question that I don't know: can a perl var be assigned to 64 bit precision? If so, then this becomes easier as scaling factors aren't needed. If not then we can do this with 32 bit math. In reply to Re: Module for file size arithmetic
by Marshall
|
|