Can someone help me with retaining the precisions when they are zero?
ie -
$f = 9.00
$z = $f;
print $z; #result in 9 - bad I want 9.00
$fx = 9.25
$z = $fx;
print $z; #result in 9.25 - good
I can but don't want to use a sub like itoa. Is there a better way to
convert to string?
$z=itoa($f);
print $z #result 9.00
$z=itoa($fx);
print $z #result 9.25
sub itoa { return sprintf("%.2f", $_[0]); }
-----------------------------------------
eMail solutions by
http://www.swanmail.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]