sub get_price{ my $self = shift; my $base_price = $self->{_quantity} * $self->{_item_price}; return $base_price *= $self->{_quantity} > 1000 ? 0.95 : 0.98; }