I really hope your default is in lbs
I'm a big fan of using units. There wasn't really anything (update: unit-self-aware) on CPAN at the time, so I wrote Math::Units::PhysicalValue, which would make the initial weight so much clearer.
use Math::Units::PhysicalValue qw(PV); my $weight = PV "170 lb"; my $mass = $weight + "0 kg"; print "My mass on earth at sea level is $mass.\n";
-Paul
In reply to Re^2: Calculate Your Weight On Various Heavenly Bodies
by jettero
in thread Calculate Your Weight On Various Heavenly Bodies
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |