more useful options | |
PerlMonks |
Re: Re: Dividing and formatby davido (Cardinal) |
on Nov 27, 2003 at 17:20 UTC ( [id://310563]=note: print w/replies, xml ) | Need Help?? |
hotshot mentioned that he wanted 12000/1000 to print as "12.0". Your pure-math method results in output of "12", and thus doesn't meet the OP's specifications.
It would seem that, given he wishes not to use printf or formats, his best bet is the sprintf tool.
Dave "If I had my life to live over again, I'd be a plumber." -- Albert Einstein
In Section
Seekers of Perl Wisdom
|
|