in reply to
converting digits
printf("%.2f",$value);
will do exactly what you need
Comment on
Re: converting digits
Download
Code
Replies are listed 'Best First'.
Re: Re: converting digits
by
fuzzyping
(Chaplain)
on Jul 29, 2002 at 17:01 UTC
Actually, no, sprintf is what she wants (as we've already mentioned), based on her question. She asked for a formatted value to be
returned
, not printed. Now see, you've made me go and waste more bits on this thread that were otherwise unnecessary.
-fp
[reply]
In Section
Seekers of Perl Wisdom