Edit: after reading your post again, I'm afraid it doesn't really do what you want (though I think it's pretty elegant), because it will round down to the nearest integer.my $kb = 1024 * 1024; # set to 1 Gb my $mb = $kb >> 10; my $gb = $mb >> 10; print "$kb kb = $mb mb = $gb gb\n"; __END__ 1048576 kb = 1024 mb = 1 gb
In reply to Re: GB, MB, KB and on..
by Joost
in thread GB, MB, KB and on..
by cez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |