in reply to significant digits in computations

Use sprintf:
my $price = 240; $price = sprintf "%.2f", $price; print $price;
prints
240.00