perl ternary operator as value code example Example: ternary operator perl $hours > 40 ? get_overtime_wage($hours) : get_normal_wage($hours);