Thank you for sharing your code. There is a related module Number::Bytes::Human:
$ perl -l use strict; use warnings; use Number::Bytes::Human qw(format_bytes); print format_bytes(1E9, bs => 1000); print format_bytes(1E9, bs => 1024); __END__ 1.0G 954M
In reply to Re: "Human" pretty-printer for data capacity
by andreas1234567
in thread "Human" pretty-printer for data capacity
by calin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |