sub toKbytes { my $bytes = shift; return $bytes / 1024; } sub toMbytes { my $bytes = shift; return $bytes / (1024 * 1024); }