cs::Units - simple units conversions
use cs::Units;
$elapsed = cs::Units::sec2human(3);
$storage = cs::Units::bytes2human();
$count = cs::Units::num2human(2);
@dec = cs::Units::decompose($somevalue, \@unitsTbale, $count);
This module implements a simple decomposition of numbers into human friendly subunits.
Return the decomposition of the supplied value into subunits based on the table supplied in the arrayref units using at most count subdivisions (default 2). In an array context returns an array of (n1,ab1, n2,ab2, ...) where n1 is the number of units of size 1 with abbrevation ab1 and so forth, from largest units to smallest. In a scalar context returns the concatenation of this array.
Convenience routine calling decompose(secs,\@cs::Units::TimeUnits,count).
Convenience routine calling decompose(bytes,\@cs::Units::StorageUnits,count).
Convenience routine calling decompose(number,\@cs::Units::SizeUnits,count).
Cameron Simpson <cs@zip.com.au>