use constant BREAK_POINT => 100; use constant BONUS_FEE => 200; my $total_fee = $tfee+$rfee >= BREAK_POINT ? BONUS_FEE : $tfee+$rfee;