On Tue, Jul 10, 2001 at 12:44:09PM -0700, Thomas Jakub wrote:
: okay... so how do I drop of all but two decimal
: points in perl?
Give sprintf() a try:
my $float = 4.3456;
[... some code ...]
$float = sprintf "%.2f", $float;
s?printf() will do it's best to round for you too, allthough the
rounding isn't perfect.
Please read:
perldoc -q sprintf
perldoc -q printf
Casey West
--
I'd rather listen to Newton than to Mundie. He may have been dead for
almost three hundred years, but despite that he stinks up the room
less.
-- Linus