When I wrote it for AOTA, it was quick'n'dirty...
Here is a megafy routine that I wrote for the Disk_Space CNC module...
I'm sure you'll know where to use it...
sub megafy {
my $num = shift;
my $kb = 1024;
my $mb = $kb ** 2;
#Mega routine
if ($num >= $mb) {
return sprintf('%.2f Mb', $num/$mb);
}
else {
return sprintf('%.2f kb', $num/$kb);
}
}
Just plug this in and juice it up...
--
Terra
--Unsung hero--
FutureQuest