in reply to "Human" pretty-printer for data capacity

New IEC prefixes for multiples of 1024 were introduced in 1998 or so, get with the times man :)

While you're at it, you may as well toss in the zetta- and yotta- prefixes...

my @suffixes = qw/B KiB MiB GiB TiB PiB EiB ZiB YiB/;

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
Re^2: "Human" pretty-printer for data capacity
by calin (Deacon) on Oct 03, 2007 at 11:52 UTC

    I know about these prefixes but I chose not to put them in the code because a) nobody seems to be using them and b) the code is intentionally ambiguous.

    By the way the format used in the GNU utils is only the letter without 'B' suffix and no space like this: '456', '21.3K', '16G' etc.