$fee = determine_maximum_fee(); sub determine_total_fee { #### $fee = ($tfee / 100 + $sfee/100 + 0.0000001) * 100 #### $mfee = 200 if ($fee >= 100); #### $fee = $mfee if $mfee; #### return $fee; } #### use constant BREAK_POINT => 100; use constant BONUS_FEE => 200; my $total_fee = $tfee+$rfee >= BREAK_POINT ? BONUS_FEE : $tfee+$rfee;