my $price = 1795; # Cents, not dollars my $qtyx = 3; # Amount, not a price. my $cost = $price * $qtyx; my $cost_to_display = $cost / 100;